public class AddressEndpointContext extends Object implements EndpointContext
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ID_TRUNC_LENGTH |
| Constructor and Description |
|---|
AddressEndpointContext(InetAddress address,
int port)
Creates a context for an IP address and port.
|
AddressEndpointContext(InetSocketAddress peerAddress)
Creates a context for a socket address.
|
AddressEndpointContext(InetSocketAddress peerAddress,
Principal peerIdentity)
Creates a context for a socket address and an authenticated identity.
|
AddressEndpointContext(InetSocketAddress peerAddress,
String virtualHost,
Principal peerIdentity)
Create endpoint context with principal.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
entries()
Gets a Set of a Map.Entry which contains the key-value pair of the
CorrelationContext.
|
String |
get(String key)
Gets a value from this context.
|
InetSocketAddress |
getPeerAddress()
Gets the inet address of the peer that the message is for or from.
|
protected String |
getPeerAddressAsString() |
Principal |
getPeerIdentity()
Gets the identity of the peer that the message is for or from.
|
String |
getVirtualHost()
Gets the name of the virtual host that this endpoint
is scoped to.
|
boolean |
hasCriticalEntries()
Check, if the correlation information contained, contains critical
entries relevant for matching.
|
String |
toString() |
protected static final int ID_TRUNC_LENGTH
public AddressEndpointContext(InetAddress address, int port)
address - IP address of peerport - port of peerNullPointerException - if provided address is null.public AddressEndpointContext(InetSocketAddress peerAddress)
peerAddress - socket address of peer's serviceNullPointerException - if provided peer address is null.public AddressEndpointContext(InetSocketAddress peerAddress, Principal peerIdentity)
peerAddress - socket address of peer's servicepeerIdentity - peer's principalNullPointerException - if provided peer address is null.public AddressEndpointContext(InetSocketAddress peerAddress, String virtualHost, Principal peerIdentity)
peerAddress - socket address of peer's servicevirtualHost - the name of the virtual host at the peerpeerIdentity - peer's principalNullPointerException - if provided peer address is null.public String get(String key)
get in interface EndpointContextkey - the key to retrieve the value for.nullpublic Map<String,String> entries()
entries in interface EndpointContextpublic boolean hasCriticalEntries()
EndpointContexthasCriticalEntries in interface EndpointContexttrue, if critical entries contained, and no new
connection could match the correlation context provided in this
instance. false, if a new connection may match this
correlation context.public final Principal getPeerIdentity()
EndpointContextgetPeerIdentity in interface EndpointContextnull, if not available.public final InetSocketAddress getPeerAddress()
EndpointContextgetPeerAddress in interface EndpointContextpublic final String getVirtualHost()
EndpointContextgetVirtualHost in interface EndpointContextnull if no virtual host is set.protected final String getPeerAddressAsString()
Copyright © 2019 Eclipse Foundation. All rights reserved.