| Modifier | Constructor and Description |
|---|---|
protected |
ReadResult() |
protected |
ReadResult(Connection<L> connection) |
protected |
ReadResult(Connection<L> connection,
K message,
L srcAddress,
int readSize) |
| Modifier and Type | Method and Description |
|---|---|
Object |
copy() |
static <K,L> ReadResult<K,L> |
create(Connection<L> connection) |
static <K,L> ReadResult<K,L> |
create(Connection<L> connection,
K message,
L srcAddress,
int readSize) |
Connection<L> |
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.
|
Holder<L> |
getSrcAddressHolder()
Get the source address, the message was read from.
|
void |
recycle() |
protected void |
reset() |
protected void |
set(Connection<L> connection,
K message,
L srcAddress,
int readSize)
One method to set all the WriteResult properties.
|
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.
|
void |
setSrcAddressHolder(Holder<L> srcAddressHolder)
Set the source address, the message was read from.
|
protected ReadResult()
protected ReadResult(Connection<L> connection)
protected ReadResult(Connection<L> connection, K message, L srcAddress, int readSize)
public static <K,L> ReadResult<K,L> create(Connection<L> connection)
public static <K,L> ReadResult<K,L> create(Connection<L> connection, K message, L srcAddress, int readSize)
public final Connection<L> getConnection()
Connection data were read from.getConnection in interface ResultConnection data were read from.public final K getMessage()
public final void setMessage(K message)
message - the message, which was read.public final L getSrcAddress()
public final Holder<L> getSrcAddressHolder()
public final void setSrcAddress(L srcAddress)
srcAddress - the source address, the message was read from.public final void setSrcAddressHolder(Holder<L> srcAddressHolder)
srcAddressHolder - the source address, the message was read from.public final int getReadSize()
public final void setReadSize(int readSize)
readSize - the number of bytes, which were read.protected void set(Connection<L> connection, K message, L srcAddress, int readSize)
connection - message - srcAddress - readSize - protected void reset()
Copyright © 2014 Oracle Corporation. All Rights Reserved.