public final class SocketAddressBuffer
extends java.lang.Object
Constructor and Description |
---|
SocketAddressBuffer()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear both addresses in the buffer.
|
java.net.SocketAddress |
getDestinationAddress()
Get the destination address.
|
<A extends java.net.SocketAddress> |
getDestinationAddress(java.lang.Class<A> type)
Get the destination address.
|
java.net.SocketAddress |
getSourceAddress()
Get the source address.
|
<A extends java.net.SocketAddress> |
getSourceAddress(java.lang.Class<A> type)
Get the source address.
|
void |
setDestinationAddress(java.net.SocketAddress destinationAddress)
Set the destination address.
|
void |
setSourceAddress(java.net.SocketAddress sourceAddress)
Set the source address.
|
public java.net.SocketAddress getSourceAddress()
null
if not setpublic <A extends java.net.SocketAddress> A getSourceAddress(java.lang.Class<A> type)
type
- the address type to getnull
if not setpublic void setSourceAddress(java.net.SocketAddress sourceAddress)
sourceAddress
- the source address, or null
to clearpublic java.net.SocketAddress getDestinationAddress()
null
if not setpublic <A extends java.net.SocketAddress> A getDestinationAddress(java.lang.Class<A> type)
type
- the address type to getnull
if not setpublic void setDestinationAddress(java.net.SocketAddress destinationAddress)
destinationAddress
- the destination address, or null
to clearpublic void clear()
Copyright © 2016 JBoss, a division of Red Hat, Inc.