public class DefaultWriteRequest extends Object implements WriteRequest
WriteRequest
.Modifier and Type | Field and Description |
---|---|
static byte[] |
EMPTY_MESSAGE
An empty message
|
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() |
Object |
getMessage() |
WriteRequest |
getOriginalRequest() |
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.message
- The message that will be writtenpublic DefaultWriteRequest(Object message, WriteFuture future)
WriteFuture
.message
- The message that will be writtenfuture
- The associated 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()
getFuture
in interface WriteRequest
WriteFuture
that is associated with this write request.public Object getMessage()
getMessage
in interface WriteRequest
public WriteRequest getOriginalRequest()
getOriginalRequest
in interface WriteRequest
WriteRequest
which was requested originally,
which is not transformed by any IoFilter
.public SocketAddress getDestination()
getDestination
in interface WriteRequest
public boolean isEncoded()
isEncoded
in interface WriteRequest
Copyright © 2004–2018 Apache MINA Project. All rights reserved.