Ignore:
Timestamp:
10/16/13 16:19:02 (11 years ago)
Author:
stoda
Message:

UID changed to reference
TODO: add UID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/supervisor/src/main/java/omq/client/proxy/Proxymq.java

    r104 r105  
    4646        private static final String multi = "multi#";
    4747
    48         private String uid;
     48        private String reference;
    4949        private transient String exchange;
    5050        private transient String multiExchange;
     
    7272         * Proxymq Constructor.
    7373         *
    74          * This constructor uses an uid to know which object will call. It also uses
     74         * This constructor uses an reference to know which object will call. It also uses
    7575         * Properties to set where to send the messages
    7676         *
    77          * @param uid
    78          *            The uid represents the unique identifier of a remote object
     77         * @param reference
     78         *            The reference represents the unique identifier of a remote object
    7979         * @param clazz
    8080         *            It represents the real class of the remote object. With this
     
    8585         * @throws Exception
    8686         */
    87         public Proxymq(String uid, Class<?> clazz, Broker broker) throws Exception {
    88                 this.uid = uid;
     87        public Proxymq(String reference, Class<?> clazz, Broker broker) throws Exception {
     88                this.reference = reference;
    8989                this.broker = broker;
    9090                rListener = broker.getResponseListener();
     
    9595                env = broker.getEnvironment();
    9696                exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE, "");
    97                 multiExchange = multi + uid;
     97                multiExchange = multi + reference;
    9898                replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE);
    9999
     
    165165                } else {
    166166                        exchange = this.exchange;
    167                         routingkey = uid;
     167                        routingkey = reference;
    168168                }
    169169
    170170                // Add the correlation ID and create a replyTo property
    171                 BasicProperties props = new BasicProperties.Builder().appId(uid).correlationId(corrId).replyTo(replyQueueName).type(serializerType)
     171                BasicProperties props = new BasicProperties.Builder().appId(reference).correlationId(corrId).replyTo(replyQueueName).type(serializerType)
    172172                                .deliveryMode(deliveryMode).build();
    173173
     
    175175                byte[] bytesRequest = serializer.serialize(serializerType, request);
    176176                broker.publishMessge(exchange, routingkey, props, bytesRequest);
    177                 logger.debug("Proxymq: " + uid + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: "
     177                logger.debug("Proxymq: " + reference + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: "
    178178                                + replyQueueName + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync()
    179179                                + ", delivery mode: " + deliveryMode);
     
    359359        @Override
    360360        public String getRef() {
    361                 return uid;
     361                return reference;
    362362        }
    363363
Note: See TracChangeset for help on using the changeset viewer.