Package org.apache.mina.common
Class IoFilter.WriteRequest
- java.lang.Object
-
- org.apache.mina.common.IoFilter.WriteRequest
-
- Enclosing interface:
- IoFilter
public static class IoFilter.WriteRequest extends java.lang.ObjectRepresents write request fired byIoSession.write(Object).
-
-
Constructor Summary
Constructors Constructor Description WriteRequest(java.lang.Object message)Creates a new instance withoutWriteFuture.WriteRequest(java.lang.Object message, WriteFuture future)Creates a new instance withWriteFuture.WriteRequest(java.lang.Object message, WriteFuture future, java.net.SocketAddress destination)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.SocketAddressgetDestination()Returne the destination of this write request.WriteFuturegetFuture()ReturnsWriteFuturethat is associated with this write request.java.lang.ObjectgetMessage()Returns a message object to be written.java.lang.StringtoString()
-
-
-
Constructor Detail
-
WriteRequest
public WriteRequest(java.lang.Object message)
Creates a new instance withoutWriteFuture. You'll get an instance ofWriteFutureeven if you called this constructor becausegetFuture()will return a bogus future.
-
WriteRequest
public WriteRequest(java.lang.Object message, WriteFuture future)Creates a new instance withWriteFuture.
-
WriteRequest
public WriteRequest(java.lang.Object message, WriteFuture future, java.net.SocketAddress destination)Creates a new instance.- Parameters:
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.
-
-
Method Detail
-
getFuture
public WriteFuture getFuture()
ReturnsWriteFuturethat is associated with this write request.
-
getMessage
public java.lang.Object getMessage()
Returns a message object to be written.
-
getDestination
public java.net.SocketAddress getDestination()
Returne the destination of this write request.- Returns:
- null for the default destination
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-