@Test public void testGetMessage() throws Exception { final QName serviceName = new QName("bleh"); final String inMsgContent = "in message"; final String outMsgContent = "out message"; ExchangeHandler provider = new BaseHandler() { public void handleMessage(Exchange exchange) { Assert.assertEquals( exchange.getMessage().getContent(), inMsgContent); Message outMsg = exchange.createMessage(); outMsg.setContent(outMsgContent); try { exchange.send(outMsg); } catch (Exception ex) { Assert.fail(ex.toString()); } } }; ExchangeHandler consumer = new BaseHandler() { public void handleMessage(Exchange exchange) { Assert.assertEquals( exchange.getMessage().getContent(), outMsgContent); } }; ServiceReference service = _domain.createInOutService(serviceName, provider); Exchange exchange = service.createExchange(consumer); Message inMsg = exchange.createMessage(); inMsg.setContent(inMsgContent); exchange.send(inMsg); }
@Override public Message getMessage() { return _message; }
ExchangeImpl implements Exchange { @Override public Message getMessage() { return _message; } }
ExchangeImpl implements Exchange { @Override public Message getMessage() { return _message; } ExchangeImpl(ServiceDomain domain, Dispatcher dispatcher);  ExchangeImpl(ServiceDomain domain, Dispatcher dispatch, ExchangeHandler replyHandler); }
ExchangeImpl implements Exchange { @Override public Message getMessage() { return _message; } ExchangeImpl(ServiceDomain domain, Dispatcher dispatcher);  ExchangeImpl(ServiceDomain domain, Dispatcher dispatch, ExchangeHandler replyHandler); @Override Context getContext(); @Override Context getContext(Message message); @Override Message getMessage(); @Override synchronized void send(Message message); @Override synchronized void sendFault(Message message); @Override ExchangeState getState(); Dispatcher getDispatcher(); @Override ExchangeHandler getReplyHandler(); @Override ExchangePattern getPattern(); @Override ExchangeSecurity getSecurity(); @Override Message createMessage(); @Override ExchangePhase getPhase(); @Override ExchangeContract getContract(); @Override ServiceReference getConsumer(); @Override Service getProvider(); @Override ExchangeImpl consumer(ServiceReference consumer, ServiceOperation operation); @Override ExchangeImpl provider(Service provider, ServiceOperation operation); }
ExchangeImpl implements Exchange { @Override public Message getMessage() { return _message; } ExchangeImpl(ServiceDomain domain, Dispatcher dispatcher);  ExchangeImpl(ServiceDomain domain, Dispatcher dispatch, ExchangeHandler replyHandler); @Override Context getContext(); @Override Context getContext(Message message); @Override Message getMessage(); @Override synchronized void send(Message message); @Override synchronized void sendFault(Message message); @Override ExchangeState getState(); Dispatcher getDispatcher(); @Override ExchangeHandler getReplyHandler(); @Override ExchangePattern getPattern(); @Override ExchangeSecurity getSecurity(); @Override Message createMessage(); @Override ExchangePhase getPhase(); @Override ExchangeContract getContract(); @Override ServiceReference getConsumer(); @Override Service getProvider(); @Override ExchangeImpl consumer(ServiceReference consumer, ServiceOperation operation); @Override ExchangeImpl provider(Service provider, ServiceOperation operation);  }