public class TransportEvent extends Object
| Constructor and Description |
|---|
TransportEvent(byte[] data,
Link<byte[]> link)
Constructs the transport even object using link to
initialize local and remote address if link not null
|
TransportEvent(byte[] data,
SocketAddress localAddr,
SocketAddress remoteAddr)
Constructs an object event
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Gets the data
|
Link<byte[]> |
getLink()
Returns the link associated with the event
which can be used to write back to the client
without creating a new link
|
SocketAddress |
getLocalAddress()
Gets the local socket address
|
SocketAddress |
getRemoteAddress()
Gets the remote socket address
|
public TransportEvent(byte[] data, SocketAddress localAddr, SocketAddress remoteAddr)
data - the datalocalAddr - the local socket addressremoteAddr - the remote socket addresspublic TransportEvent(byte[] data, Link<byte[]> link)
data - link - public byte[] getData()
public Link<byte[]> getLink()
public SocketAddress getLocalAddress()
public SocketAddress getRemoteAddress()
Copyright © 2015 The Apache Software Foundation. All rights reserved.