Modifier | Constructor and Description |
---|---|
protected |
ReadResult(Connection connection) |
protected |
ReadResult(Connection connection,
K message,
L srcAddress,
int readSize) |
Modifier and Type | Method and Description |
---|---|
static <K,L> ReadResult<K,L> |
create(Connection connection) |
static <K,L> ReadResult<K,L> |
create(Connection connection,
K message,
L srcAddress,
int readSize) |
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.
|
Holder<L> |
getSrcAddressHolder()
Get the source address, the message was read from.
|
void |
recycle() |
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(Connection connection)
protected ReadResult(Connection connection, K message, L srcAddress, int readSize)
public static <K,L> ReadResult<K,L> create(Connection connection)
public static <K,L> ReadResult<K,L> create(Connection connection, K message, L srcAddress, int readSize)
public final Connection getConnection()
Connection
data were read from.getConnection
in interface Result
Connection
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.Copyright © 2014 Oracle Corporation. All rights reserved.