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

J

Location:
trunk/src/main/java/omq/common/message
Files:
2 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);
  • trunk/src/main/java/omq/common/message/Response.java

    r44 r83  
    55import omq.exception.OmqException;
    66
     7/**
     8 * Serializable response information. This class is used to send the information
     9 * to the client proxy. It has information about which remoteObject has invoked
     10 * the method and its correlation id. This class also has the result of the
     11 * invoke if everything has gone fine in the server or an error otherwise.
     12 *
     13 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     14 *
     15 */
    716public class Response implements Serializable {
    817
     
    1726        private String idOmq;
    1827
     28        // Used by kryo
    1929        public Response() {
    2030        }
    2131
     32        /**
     33         * Creates a new Response object to be serialized
     34         *
     35         * @param id
     36         *            - correlation id of the invoke
     37         * @param idOmq
     38         *            - objectmq's identifier -bind reference-
     39         * @param result
     40         *            - result of the invocation
     41         * @param error
     42         *            - error thrown by the invocation
     43         */
    2244        public Response(String id, String idOmq, Object result, OmqException error) {
    2345                this.id = id;
Note: See TracChangeset for help on using the changeset viewer.