org.glassfish.grizzly
Class ReadResult<K,L>

java.lang.Object
  extended by org.glassfish.grizzly.ReadResult<K,L>
All Implemented Interfaces:
Result

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

Result of read operation, retuned by Readable.

Author:
Alexey Stashok

Constructor Summary
ReadResult(Connection connection)
           
ReadResult(Connection connection, K message, L srcAddress, int readSize)
           
 
Method Summary
 Connection getConnection()
          Get the Connection data were read from.
 K getMessage()
          Get the message, which was read.
 int getReadSize()
          Get the number of bytes, which were read.
 L getSrcAddress()
          Get the source address, the message was read from.
 void setMessage(K message)
          Set the message, which was read.
 void setReadSize(int readSize)
          Set the number of bytes, which were read.
 void setSrcAddress(L srcAddress)
          Set the source address, the message was read from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadResult

public ReadResult(Connection connection)

ReadResult

public ReadResult(Connection connection,
                  K message,
                  L srcAddress,
                  int readSize)
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.

getSrcAddress

public L getSrcAddress()
Get the source address, the message was read from.

Returns:
the source address, the message was read from.

setSrcAddress

public void setSrcAddress(L srcAddress)
Set the source address, the message was read from.

Parameters:
srcAddress - the source address, the message was read from.

getReadSize

public int getReadSize()
Get the number of bytes, which were read.

Returns:
the number of bytes, which were read.

setReadSize

public void setReadSize(int readSize)
Set the number of bytes, which were read.

Parameters:
readSize - the number of bytes, which were read.


Copyright © 2009 SUN Microsystems. All Rights Reserved.