Ignore:
Timestamp:
07/08/13 13:29:24 (11 years ago)
Author:
stoda
Message:

J

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/common/message/Request.java

    r75 r83  
    33import java.io.Serializable;
    44
     5/**
     6 * Serializable request information. This class is used to send the information
     7 * to the server. It has information about which method is wanted to invoke, its
     8 * parameters, its correlation id and if a response is needed -asynchronous
     9 * method-.
     10 *
     11 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     12 *
     13 */
    514public class Request implements Serializable {
    615
     
    2029        private transient int retries;
    2130
     31        // This constructor is used by kryo
    2232        public Request() {
    2333        }
     
    3848        }
    3949
     50        /**
     51         * This method creates a new synchronous request
     52         *
     53         * @param id
     54         *            - correlation id of this invocation
     55         * @param method
     56         *            - method name wanted to call
     57         * @param params
     58         *            - parameters of this method
     59         * @return - new SyncRequest
     60         */
    4061        public static Request newSyncRequest(String id, String method, Object[] params) {
    4162                return new Request(id, method, false, params);
    4263        }
    4364
     65        /**
     66         * This method creates a new synchronous request
     67         *
     68         * @param id
     69         *            - correlation id of this invocation
     70         * @param method
     71         *            - method name wanted to call
     72         * @param params
     73         *            - parameters of this method
     74         * @param retries
     75         *            - How many retries will be done
     76         * @param timeout
     77         *            - Timeout for every retry
     78         * @param multi
     79         *            - If the method is multi
     80         * @param wait
     81         *            - If the method is multi how many responses will be listened
     82         * @return - new SyncRequest
     83         */
    4484        public static Request newSyncRequest(String id, String method, Object[] params, int retries, long timeout, boolean multi, int wait) {
    4585                Request req = new Request(id, method, false, params, multi);
     
    5090        }
    5191
     92        /**
     93         * This method creates a new asynchronous request
     94         *
     95         * @param id
     96         *            - correlation id of this invocation
     97         * @param method
     98         *            - method name wanted to call
     99         * @param params
     100         *            - parameters of this method
     101         * @param multi
     102         *            - If the method is multi
     103         * @return new AsyncRequest
     104         */
    52105        public static Request newAsyncRequest(String id, String method, Object[] params, boolean multi) {
    53106                return new Request(id, method, true, params, multi);
Note: See TracChangeset for help on using the changeset viewer.