java.lang.Object
org.xnio.channels.SocketAddressBuffer
A buffer for source and destination addresses.
- Author:
- David M. Lloyd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear both addresses in the buffer.Get the destination address.<A extends SocketAddress>
AgetDestinationAddress
(Class<A> type) Get the destination address.Get the source address.<A extends SocketAddress>
AgetSourceAddress
(Class<A> type) Get the source address.void
setDestinationAddress
(SocketAddress destinationAddress) Set the destination address.void
setSourceAddress
(SocketAddress sourceAddress) Set the source address.
-
Constructor Details
-
SocketAddressBuffer
public SocketAddressBuffer()Construct a new instance.
-
-
Method Details
-
getSourceAddress
Get the source address.- Returns:
- the source address, or
null
if not set
-
getSourceAddress
Get the source address.- Parameters:
type
- the address type to get- Returns:
- the source address, or
null
if not set
-
setSourceAddress
Set the source address.- Parameters:
sourceAddress
- the source address, ornull
to clear
-
getDestinationAddress
Get the destination address.- Returns:
- the destination address, or
null
if not set
-
getDestinationAddress
Get the destination address.- Parameters:
type
- the address type to get- Returns:
- the destination address, or
null
if not set
-
setDestinationAddress
Set the destination address.- Parameters:
destinationAddress
- the destination address, ornull
to clear
-
clear
public void clear()Clear both addresses in the buffer.
-