Ignore:
Timestamp:
06/18/13 16:51:22 (11 years ago)
Author:
stoda
Message:

Refactoring Environment class - deleted.
StopBroker? problems solved (?)
Server can receive send and receive messages in different formats.
Some tests modified

TODO: finish all the tests, add log4j

File:
1 edited

Legend:

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

    r44 r47  
    4747
    4848        private String uid;
     49        private transient String serializerType;
    4950        private transient ResponseListener rListener;
    5051        private transient EventDispatcher dispatcher;
     
    8990                // this.channel = Broker.getChannel();
    9091                this.env = env;
     92
     93                // set the serializer type
     94                serializerType = env.getProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
    9195
    9296                listeners = new HashMap<String, EventListener<?>>();
     
    150154
    151155                // Add the correlation ID and create a replyTo property
    152                 BasicProperties props = new BasicProperties.Builder().appId(uid).correlationId(corrId).replyTo(replyQueueName).build();
     156                BasicProperties props = new BasicProperties.Builder().appId(uid).correlationId(corrId).replyTo(replyQueueName).type(serializerType).build();
    153157
    154158                // Publish the message
    155                 byte[] bytesRequest = Serializer.serialize(request);
     159                byte[] bytesRequest = Serializer.serialize(serializerType, request);
    156160                // TODO See this
    157161                // channel.basicPublish(exchange, routingkey, props, bytesRequest);
     
    306310        }
    307311
     312        public static void stopProxy() {
     313                proxies = new HashMap<String, Object>();
     314        }
     315
     316        public static Map<String, Object> getProxies() {
     317                return proxies;
     318        }
     319
     320        public static void setProxies(Map<String, Object> proxies) {
     321                Proxymq.proxies = proxies;
     322        }
     323
    308324        @Override
    309325        public String getRef() {
Note: See TracChangeset for help on using the changeset viewer.