org.jboss.errai.bus.server.io
Class DirectDeliveryHandler
java.lang.Object
org.jboss.errai.bus.server.io.DirectDeliveryHandler
- All Implemented Interfaces:
- DirectChannel, MessageDeliveryHandler, Wakeable
public class DirectDeliveryHandler
- extends Object
- implements MessageDeliveryHandler, Wakeable, DirectChannel
- Author:
- Mike Brock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createFor
public static MessageDeliveryHandler createFor(QueueChannel channel)
deliver
public boolean deliver(MessageQueue queue,
Message message)
throws IOException
- Description copied from interface:
MessageDeliveryHandler
- This method is responsible for delivering a message into the transport layer. The contract between the message
bus and the transport layer is completely governed by the implementation of the method.
- Specified by:
deliver
in interface MessageDeliveryHandler
- Parameters:
queue
- the MessageQueue
to deliver from.message
- the Message
to deliver.
- Returns:
- true if the message was successfully accepted.
- Throws:
IOException
- an IOException may be thrown if there is a problem interacting with the underlying transport.
onWake
public void onWake(MessageQueue queue)
throws IOException
- Specified by:
onWake
in interface Wakeable
- Throws:
IOException
noop
public void noop(MessageQueue queue)
throws IOException
- Description copied from interface:
MessageDeliveryHandler
- Sends a NOOP (No-Operation) to the remote connected
- Specified by:
noop
in interface MessageDeliveryHandler
- Throws:
IOException
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interface DirectChannel
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.