public class DefaultWriteRequest extends Object implements WriteRequest
WriteRequest.| Constructor and Description |
|---|
DefaultWriteRequest(Object message)
Creates a new instance without
WriteFuture. |
DefaultWriteRequest(Object message,
WriteFuture future)
Creates a new instance with
WriteFuture. |
DefaultWriteRequest(Object message,
WriteFuture future,
SocketAddress destination)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
SocketAddress |
getDestination()
Returns the destination of this write request.
|
WriteFuture |
getFuture()
Returns
WriteFuture that is associated with this write request. |
Object |
getMessage()
Returns a message object to be written.
|
WriteRequest |
getOriginalRequest()
Returns the
WriteRequest which was requested originally,
which is not transformed by any IoFilter. |
boolean |
isEncoded()
Tells if the current message has been encoded
|
String |
toString() |
public DefaultWriteRequest(Object message)
WriteFuture. You'll get
an instance of WriteFuture even if you called this constructor
because getFuture() will return a bogus future.public DefaultWriteRequest(Object message, WriteFuture future)
WriteFuture.public DefaultWriteRequest(Object message, WriteFuture future, SocketAddress destination)
message - a message to writefuture - a future that needs to be notified when an operation is finisheddestination - the destination of the message. This property will be
ignored unless the transport supports it.public WriteFuture getFuture()
WriteRequestWriteFuture that is associated with this write request.getFuture in interface WriteRequestpublic Object getMessage()
WriteRequestgetMessage in interface WriteRequestpublic WriteRequest getOriginalRequest()
WriteRequestWriteRequest which was requested originally,
which is not transformed by any IoFilter.getOriginalRequest in interface WriteRequestpublic SocketAddress getDestination()
WriteRequestgetDestination in interface WriteRequestpublic boolean isEncoded()
WriteRequestisEncoded in interface WriteRequest