use of com.adaptris.interlok.client.MessageTarget in project interlok by adaptris.
the class InterlokJmxClientTest method testProcessAsync_SerializableMessage.
@Test
public void testProcessAsync_SerializableMessage() throws Exception {
MyMessageProcessor proc = new MyMessageProcessor();
MessageTarget target = new MessageTarget().withAdapter(testName.getMethodName()).withChannel(testName.getMethodName()).withWorkflow(testName.getMethodName());
DefaultSerializableMessage msg = new DefaultSerializableMessage().withPayload(testName.getMethodName());
register(createObjectName(target), proc);
InterlokJmxClient client = new InterlokJmxClient(jmxConnectorServer.getAddress());
try {
client.connect();
client.processAsync(target, msg);
assertEquals(msg.getUniqueId(), proc.getMessage().getUniqueId());
assertEquals(msg.getContent(), proc.getMessage().getContent());
} finally {
client.disconnect();
}
}
Aggregations