public class NonReliableRequestReplySender extends java.lang.Object implements RequestReplySender, java.lang.Thread.UncaughtExceptionHandler
RequestReplySender that provides no qualities of service.
Since ZeroMQ requires the creating socket thread to dispatch messages, a looping thread is used for sending messages. Messages are provided to the thread via
a queue.| Constructor and Description |
|---|
NonReliableRequestReplySender(java.lang.String id,
ContextManager manager,
java.util.List<org.fabric3.spi.federation.addressing.SocketAddress> addresses,
long pollTimeout,
org.fabric3.api.binding.zeromq.model.ZeroMQMetadata metadata,
MessagingMonitor monitor) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getId() |
void |
onUpdate(java.util.List<org.fabric3.spi.federation.addressing.SocketAddress> addresses) |
byte[] |
sendAndReply(byte[] message,
int index,
org.fabric3.spi.container.invocation.WorkContext workContext)
Sends the message over the socket and blocks for a response.
|
void |
start()
Initializes the client and its underlying socket.
|
void |
stop()
Disposes the client and any open resources.
|
void |
uncaughtException(java.lang.Thread t,
java.lang.Throwable e) |
public NonReliableRequestReplySender(java.lang.String id,
ContextManager manager,
java.util.List<org.fabric3.spi.federation.addressing.SocketAddress> addresses,
long pollTimeout,
org.fabric3.api.binding.zeromq.model.ZeroMQMetadata metadata,
MessagingMonitor monitor)
public void start()
Senderpublic void stop()
Senderpublic java.lang.String getId()
getId in interface org.fabric3.spi.federation.addressing.AddressListenerpublic void onUpdate(java.util.List<org.fabric3.spi.federation.addressing.SocketAddress> addresses)
onUpdate in interface org.fabric3.spi.federation.addressing.AddressListenerpublic byte[] sendAndReply(byte[] message,
int index,
org.fabric3.spi.container.invocation.WorkContext workContext)
RequestReplySendersendAndReply in interface RequestReplySendermessage - the serialized messageindex - the operation index used to determine which intercept chain to dispatch the message toworkContext - the current work contextpublic void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
uncaughtException in interface java.lang.Thread.UncaughtExceptionHandler