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

J

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/server/RemoteObject.java

    r77 r83  
    2323
    2424/**
     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!!!-.
    2530 *
    2631 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    5863        }
    5964
     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         */
    6076        public void startRemoteObject(String reference, Broker broker, Properties env) throws Exception {
    6177                this.broker = broker;
     
    8197                // Start this listener
    8298                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                 }
    9199        }
    92100
     
    133141        }
    134142
     143        /**
     144         * This method kills all the threads waiting for requests
     145         *
     146         * @throws IOException
     147         *             - If an operation failed.
     148         */
    135149        public void kill() throws IOException {
    136150                logger.warn("Killing objectmq: " + this.getRef());
     
    141155        }
    142156
     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         */
    143165        public Object invokeMethod(String methodName, Object[] arguments) throws Exception {
    144166
     
    149171        }
    150172
     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         */
    151182        private Method loadMethod(String methodName, Object[] args) throws NoSuchMethodException {
    152183                Method m = null;
     
    171202        }
    172203
     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         */
    173215        private Method loadMethodWithPrimitives(String methodName, Class<?>[] argArray) throws NoSuchMethodException {
    174216                if (argArray != null) {
     
    213255        }
    214256
     257        /**
     258         * This method starts the queues using the information got in the
     259         * environment.
     260         *
     261         * @throws Exception
     262         */
    215263        private void startQueues() throws Exception {
    216264                // Get info about which exchange and queue will use
Note: See TracChangeset for help on using the changeset viewer.