Changeset 83 for trunk/src/main/java/omq/server/RemoteObject.java
- Timestamp:
- 07/08/13 13:29:24 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/server/RemoteObject.java
r77 r83 23 23 24 24 /** 25 * A RemoteObject when it's started will be waiting for requests and will invoke 26 * them. When a RemoteObject is started it listens two queues, the first one has 27 * the same name as its reference and the second one is its multiqueue -this 28 * name can be set using a property, be aware to use a name not used by another 29 * object!!!-. 25 30 * 26 31 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> … … 58 63 } 59 64 65 /** 66 * This method starts a remoteObject. 67 * 68 * @param reference 69 * - broker's binding referece 70 * @param broker 71 * - broker that binds this remoteObject 72 * @param env 73 * - properties of this remoteObject 74 * @throws Exception 75 */ 60 76 public void startRemoteObject(String reference, Broker broker, Properties env) throws Exception { 61 77 this.broker = broker; … … 81 97 // Start this listener 82 98 this.start(); 83 }84 85 public void startTriggerEvent(String reference, Broker broker) throws Exception {86 this.broker = broker;87 UID = reference;88 if (channel == null || !channel.isOpen()) {89 channel = broker.getChannel();90 }91 99 } 92 100 … … 133 141 } 134 142 143 /** 144 * This method kills all the threads waiting for requests 145 * 146 * @throws IOException 147 * - If an operation failed. 148 */ 135 149 public void kill() throws IOException { 136 150 logger.warn("Killing objectmq: " + this.getRef()); … … 141 155 } 142 156 157 /** 158 * This method invokes the method specified by methodName and arguments 159 * 160 * @param methodName 161 * @param arguments 162 * @return result 163 * @throws Exception 164 */ 143 165 public Object invokeMethod(String methodName, Object[] arguments) throws Exception { 144 166 … … 149 171 } 150 172 173 /** 174 * This method loads the method specified by methodName and args 175 * 176 * @param methodName 177 * @param args 178 * @return method 179 * @throws NoSuchMethodException 180 * - If the method cannot be found 181 */ 151 182 private Method loadMethod(String methodName, Object[] args) throws NoSuchMethodException { 152 183 Method m = null; … … 171 202 } 172 203 204 /** 205 * This method loads a method which uses primitives as arguments 206 * 207 * @param methodName 208 * - name of the method wanted to invoke 209 * @param argArray 210 * - arguments 211 * @return method 212 * @throws NoSuchMethodException 213 * - If the method cannot be found 214 */ 173 215 private Method loadMethodWithPrimitives(String methodName, Class<?>[] argArray) throws NoSuchMethodException { 174 216 if (argArray != null) { … … 213 255 } 214 256 257 /** 258 * This method starts the queues using the information got in the 259 * environment. 260 * 261 * @throws Exception 262 */ 215 263 private void startQueues() throws Exception { 216 264 // Get info about which exchange and queue will use
Note: See TracChangeset
for help on using the changeset viewer.