E
- public class EndpointKey<E> extends Endpoint<E>
Endpoint
implementation.
The EndpointKey contains the endpoint address, that will be used by
a ConnectorHandler
passed to MultiEndpointPool
to establish a
new client-side Connection
.
Additionally, the EndpointKey contains an internal key object
(getInternalKey()
) that is used in the Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methods.Endpoint.Factory
Constructor and Description |
---|
EndpointKey(Object internalKey,
E endpointAddress)
Construct EndpointKey based on the given internalKey and endpoint.
|
EndpointKey(Object internalKey,
E endpointAddress,
ConnectorHandler<E> connectorHandler)
Construct EndpointKey based on the given internalKey, endpoint, and
ConnectorHandler . |
EndpointKey(Object internalKey,
E endpointAddress,
E localEndpointAddress)
Construct EndpointKey based on the given internalKey, endpoint,
and local endpoint.
|
EndpointKey(Object internalKey,
E endpointAddress,
E localEndpointAddress,
ConnectorHandler<E> connectorHandler) |
Modifier and Type | Method and Description |
---|---|
GrizzlyFuture<Connection> |
connect() |
ConnectorHandler<E> |
getConnectorHandler() |
E |
getEndpoint() |
Object |
getId() |
Object |
getInternalKey() |
E |
getLocalEndpoint() |
String |
toString() |
public EndpointKey(Object internalKey, E endpointAddress)
internalKey
- the internal key to be used in Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methodsendpointAddress
- the endpoint address, that will be used by
a ConnectorHandler
passed to MultiEndpointPool
to establish new client-side Connection
public EndpointKey(Object internalKey, E endpointAddress, E localEndpointAddress)
internalKey
- the internal key to be used in Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methodsendpointAddress
- the endpoint address, that will be used by
a ConnectorHandler
passed to MultiEndpointPool
to establish new client-side Connection
localEndpointAddress
- the local address that will be used by the
ConnectorHandler
to bind the local side of
the outgoing connection.public EndpointKey(Object internalKey, E endpointAddress, ConnectorHandler<E> connectorHandler)
ConnectorHandler
.internalKey
- the internal key to be used in Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methodsendpointAddress
- the endpoint address, that will be used by
a ConnectorHandler
passed to MultiEndpointPool
to establish new client-side Connection
connectorHandler
- customized ConnectorHandler
for this endpointpublic EndpointKey(Object internalKey, E endpointAddress, E localEndpointAddress, ConnectorHandler<E> connectorHandler)
internalKey
- the internal key to be used in Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methodsendpointAddress
- the endpoint address, that will be used by
a ConnectorHandler
passed to MultiEndpointPool
to establish new client-side Connection
localEndpointAddress
- the local address that will be used by the
ConnectorHandler
to bind the local side of
the outgoing connection.connectorHandler
- customized ConnectorHandler
for this endpointpublic GrizzlyFuture<Connection> connect()
public Object getInternalKey()
Endpoint.equals(java.lang.Object)
and Endpoint.hashCode()
methodspublic E getEndpoint()
ConnectorHandler
passed
to MultiEndpointPool
to establish new client-side Connection
public E getLocalEndpoint()
public ConnectorHandler<E> getConnectorHandler()
ConnectorHandler
, which will be used to
create Connection
s to this endpoint.Copyright © 2021 Oracle Corporation. All rights reserved.