Changeset 83 for trunk/src/main/java/omq/common/message/Request.java
- Timestamp:
- 07/08/13 13:29:24 (11 years ago)
- File:
-
- 1 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);
Note: See TracChangeset
for help on using the changeset viewer.