org.apache.mina.session

## Class DefaultWriteRequest

- java.lang.Object
- - org.apache.mina.session.DefaultWriteRequest

All Implemented Interfaces:
  WriteRequest

    public class DefaultWriteRequest
    extends Object
    implements WriteRequest

Default implementation for write requests.

Author:
  Apache MINA Project

### Constructor Summary

Constructors
Constructor and Description
`DefaultWriteRequest(Object originalMessage)` Creates a new instance of a WriteRequest, storing the message as it was when the IoSession.write() has been called.

### Method Summary

Methods
`IoFuture<Void>` `getFuture()` The future to be completed on a write success
`Object` `getMessage()` Get the message stored for this request.
`Object` `getOriginalMessage()` Gets the original message, as written by the handler, before passing through the filter chain.
`void` `setFuture(IoFuture<Void> future)` Store the future into the request
`void` `setMessage(Object message)` Store the encoded message
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### DefaultWriteRequest

    public DefaultWriteRequest(Object originalMessage)

Creates a new instance of a WriteRequest, storing the message as it was when the IoSession.write() has been called.

Parameters:
  `message` - The original message

### Method Detail

#### getMessage

    public Object getMessage()

Get the message stored for this request.

Specified by:
  `getMessage` in interface `WriteRequest`
Returns:
  the contained message

#### setMessage

    public void setMessage(Object message)

Store the encoded message

Specified by:
  `setMessage` in interface `WriteRequest`

#### getFuture

    public IoFuture<Void> getFuture()

The future to be completed on a write success

Specified by:
  `getFuture` in interface `WriteRequest`
Returns:
  the future

#### setFuture

    public void setFuture(IoFuture<Void> future)

Store the future into the request

Specified by:
  `setFuture` in interface `WriteRequest`

#### getOriginalMessage

    public Object getOriginalMessage()

Gets the original message, as written by the handler, before passing through the filter chain.

Specified by:
  `getOriginalMessage` in interface `WriteRequest`
Returns:
  The original message

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`
See Also:
  `Object.toString()`