Class IoFilter.WriteRequest

  • Enclosing interface:
    IoFilter

    public static class IoFilter.WriteRequest
    extends java.lang.Object
    Represents write request fired by IoSession.write(Object).
    • Constructor Detail

      • WriteRequest

        public WriteRequest​(java.lang.Object message)
        Creates a new instance without WriteFuture. You'll get an instance of WriteFuture even if you called this constructor because getFuture() will return a bogus future.
      • WriteRequest

        public WriteRequest​(java.lang.Object message,
                            WriteFuture future)
        Creates a new instance with WriteFuture.
      • WriteRequest

        public WriteRequest​(java.lang.Object message,
                            WriteFuture future,
                            java.net.SocketAddress destination)
        Creates a new instance.
        Parameters:
        message - a message to write
        future - a future that needs to be notified when an operation is finished
        destination - the destination of the message. This property will be ignored unless the transport supports it.
    • Method Detail

      • 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:
        toString in class java.lang.Object