Changeset 83 for trunk/src/main/java/omq/common/message
- Timestamp:
- 07/08/13 13:29:24 (11 years ago)
- 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 3 3 import java.io.Serializable; 4 4 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 */ 5 14 public class Request implements Serializable { 6 15 … … 20 29 private transient int retries; 21 30 31 // This constructor is used by kryo 22 32 public Request() { 23 33 } … … 38 48 } 39 49 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 */ 40 61 public static Request newSyncRequest(String id, String method, Object[] params) { 41 62 return new Request(id, method, false, params); 42 63 } 43 64 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 */ 44 84 public static Request newSyncRequest(String id, String method, Object[] params, int retries, long timeout, boolean multi, int wait) { 45 85 Request req = new Request(id, method, false, params, multi); … … 50 90 } 51 91 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 */ 52 105 public static Request newAsyncRequest(String id, String method, Object[] params, boolean multi) { 53 106 return new Request(id, method, true, params, multi); -
trunk/src/main/java/omq/common/message/Response.java
r44 r83 5 5 import omq.exception.OmqException; 6 6 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 */ 7 16 public class Response implements Serializable { 8 17 … … 17 26 private String idOmq; 18 27 28 // Used by kryo 19 29 public Response() { 20 30 } 21 31 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 */ 22 44 public Response(String id, String idOmq, Object result, OmqException error) { 23 45 this.id = id;
Note: See TracChangeset
for help on using the changeset viewer.