public interface Connection extends HandleableCloseable<Connection>, Attachable
HandleableCloseable.Key
Modifier and Type | Method and Description |
---|---|
ConnectionPeerIdentity |
getConnectionAnonymousIdentity()
Get the anonymous peer identity for the connection.
|
ConnectionPeerIdentity |
getConnectionPeerIdentity()
Get the peer identity for the connection.
|
Endpoint |
getEndpoint()
Get the local endpoint.
|
SocketAddress |
getLocalAddress()
Get the local address of this connection, if any.
|
default <S extends SocketAddress> |
getLocalAddress(Class<S> type)
Get the local address of this connection, cast to a specific type, if any.
|
org.wildfly.security.auth.server.SecurityIdentity |
getLocalIdentity()
Get the local identity of this inbound connection.
|
org.wildfly.security.auth.server.SecurityIdentity |
getLocalIdentity(int id)
Get the local identity associated with the given ID that was previously shared to the peer.
|
SocketAddress |
getPeerAddress()
Get the peer address of this connection, if any.
|
default <S extends SocketAddress> |
getPeerAddress(Class<S> type)
Get the peer address of this connection, cast to a specific type, if any.
|
ConnectionPeerIdentityContext |
getPeerIdentityContext()
Get the peer identity context for the connection.
|
int |
getPeerIdentityId()
The the ID number for the peer identity which is currently associated with the calling thread.
|
URI |
getPeerURI()
Get the URI of the remote peer.
|
Principal |
getPrincipal()
Get the local principal that was authenticated to the peer.
|
String |
getProtocol()
Get the protocol of this connection.
|
String |
getRemoteEndpointName()
Get the name of the remote endpoint, if it has one.
|
SSLSession |
getSslSession()
Get the underlying
SSLSession for this connection if one is established. |
IoFuture<Channel> |
openChannel(String serviceType,
OptionMap optionMap)
Open a channel to a remote service on this connection.
|
boolean |
supportsRemoteAuth()
Determine if the remote authentication protocol is supported by this connection.
|
addCloseHandler, awaitClosed, awaitClosedUninterruptibly, close, closeAsync, isOpen
getAttachments
SocketAddress getLocalAddress()
null
if there is no local addressdefault <S extends SocketAddress> S getLocalAddress(Class<S> type)
null
is returned.S
- the address typetype
- the address type classnull
if there is no local address or the address is
of the wrong typeSocketAddress getPeerAddress()
null
if there is no peer addressdefault <S extends SocketAddress> S getPeerAddress(Class<S> type)
null
is returned.S
- the address typetype
- the address type classnull
if there is no peer address or the address is
of the wrong typeSSLSession getSslSession()
SSLSession
for this connection if one is established.SSLSession
for the connection if one is established, otherwise returns null
.IoFuture<Channel> openChannel(String serviceType, OptionMap optionMap)
serviceType
- the service typeoptionMap
- the option mapString getRemoteEndpointName()
null
if it is anonymousEndpoint getEndpoint()
URI getPeerURI()
null
if the connection was accepted rather than established.null
if none is availableString getProtocol()
null
)org.wildfly.security.auth.server.SecurityIdentity getLocalIdentity()
null
if the connection is outboundorg.wildfly.security.auth.server.SecurityIdentity getLocalIdentity(int id)
id
- the numeric IDnull
if the the given ID is not validint getPeerIdentityId() throws org.wildfly.security.auth.AuthenticationException
org.wildfly.security.auth.AuthenticationException
- if an authentication was required to get the ID, but the authentication failedConnectionPeerIdentity getConnectionPeerIdentity() throws SecurityException
SecurityException
- if a security manager is installed and the caller is not granted the getConnectionPeerIdentity
RemotingPermission
ConnectionPeerIdentity getConnectionAnonymousIdentity()
ConnectionPeerIdentityContext getPeerIdentityContext()
Principal getPrincipal()
null
)boolean supportsRemoteAuth()
true
if remote authentication is supported, false
otherwiseCopyright © 2017 JBoss by Red Hat. All rights reserved.