public class DefaultWriteRequest extends java.lang.Object implements WriteRequest
WriteRequest
.限定符和类型 | 字段和说明 |
---|---|
static byte[] |
EMPTY_MESSAGE
An empty message
|
构造器和说明 |
---|
DefaultWriteRequest(java.lang.Object message)
Creates a new instance without
WriteFuture . |
DefaultWriteRequest(java.lang.Object message,
WriteFuture future)
Creates a new instance with
WriteFuture . |
DefaultWriteRequest(java.lang.Object message,
WriteFuture future,
java.net.SocketAddress destination)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
java.net.SocketAddress |
getDestination()
Returns the destination of this write request.
|
WriteFuture |
getFuture() |
java.lang.Object |
getMessage() |
WriteRequest |
getOriginalRequest() |
boolean |
isEncoded()
Tells if the current message has been encoded
|
java.lang.String |
toString() |
public DefaultWriteRequest(java.lang.Object message)
WriteFuture
. You'll get
an instance of WriteFuture
even if you called this constructor
because getFuture()
will return a bogus future.message
- The message that will be writtenpublic DefaultWriteRequest(java.lang.Object message, WriteFuture future)
WriteFuture
.message
- The message that will be writtenfuture
- The associated WriteFuture
public DefaultWriteRequest(java.lang.Object message, WriteFuture future, java.net.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()
getFuture
在接口中 WriteRequest
WriteFuture
that is associated with this write request.public java.lang.Object getMessage()
getMessage
在接口中 WriteRequest
public WriteRequest getOriginalRequest()
getOriginalRequest
在接口中 WriteRequest
WriteRequest
which was requested originally,
which is not transformed by any IoFilter
.public java.net.SocketAddress getDestination()
WriteRequest
getDestination
在接口中 WriteRequest
public java.lang.String toString()
toString
在类中 java.lang.Object
public boolean isEncoded()
WriteRequest
isEncoded
在接口中 WriteRequest