Changeset 83 for trunk/src/main/java/omq/server
- Timestamp:
- 07/08/13 13:29:24 (11 years ago)
- Location:
- trunk/src/main/java/omq/server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/server/InvocationThread.java
r63 r83 16 16 17 17 /** 18 * An invocationThread waits for requests an invokes them. 18 19 * 19 20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> -
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 -
trunk/src/main/java/omq/server/RemoteWrapper.java
r53 r83 13 13 14 14 /** 15 * This class is used to encapsulate the invocationThreads under the 16 * RemoteObject. 15 17 * 16 18 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> … … 40 42 } 41 43 44 /** 45 * This method notifies a delivery to an invocationThread using a 46 * blockingQueue. 47 * 48 * @param delivery 49 * - delivery which contains a Request to be invoked 50 * @throws Exception 51 */ 42 52 public void notifyDelivery(Delivery delivery) throws Exception { 43 53 this.deliveryQueue.put(delivery); 44 54 } 45 55 56 /** 57 * This method interrups all the invocationThreads under this remoteWrapper 58 */ 46 59 public void stopRemoteWrapper() { 47 60 logger.warn("Stopping Invocation threads vinculed to " + obj.getRef());
Note: See TracChangeset
for help on using the changeset viewer.