com.sun.grizzly
Class WriteResult<K,L>

java.lang.Object
  extended by com.sun.grizzly.WriteResult<K,L>
All Implemented Interfaces:
Result

public class WriteResult<K,L>
extends Object
implements Result

Result of write operation, retuned by Writable.

Author:
Alexey Stashok

Constructor Summary
WriteResult(Connection connection)
           
WriteResult(Connection connection, K message, L dstAddress, int writeSize)
           
 
Method Summary
 Connection getConnection()
          Get the Connection data were read from.
 L getDstAddress()
          Get the destination address, the message was written to.
 K getMessage()
          Get the message, which was read.
 int getWrittenSize()
          Get the number of bytes, which were written.
 void setDstAddress(L dstAddress)
          Set the destination address, the message was written to.
 void setMessage(K message)
          Set the message, which was read.
 void setWrittenSize(int writeSize)
          Set the number of bytes, which were written.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteResult

public WriteResult(Connection connection)

WriteResult

public WriteResult(Connection connection,
                   K message,
                   L dstAddress,
                   int writeSize)
Method Detail

getConnection

public Connection getConnection()
Get the Connection data were read from.

Specified by:
getConnection in interface Result
Returns:
the Connection data were read from.

getMessage

public K getMessage()
Get the message, which was read.

Returns:
the message, which was read.

setMessage

public void setMessage(K message)
Set the message, which was read.

Parameters:
message - the message, which was read.

getDstAddress

public L getDstAddress()
Get the destination address, the message was written to.

Returns:
the destination address, the message was written to.

setDstAddress

public void setDstAddress(L dstAddress)
Set the destination address, the message was written to.

Parameters:
dstAddress - the destination address, the message was written to.

getWrittenSize

public int getWrittenSize()
Get the number of bytes, which were written.

Returns:
the number of bytes, which were written.

setWrittenSize

public void setWrittenSize(int writeSize)
Set the number of bytes, which were written.

Parameters:
writeSize - the number of bytes, which were written.


Copyright © 2009 SUN Microsystems. All Rights Reserved.