Class EndpointKey<E>
- java.lang.Object
-
- org.glassfish.grizzly.connectionpool.Endpoint<E>
-
- org.glassfish.grizzly.connectionpool.EndpointKey<E>
-
- Type Parameters:
E-
public class EndpointKey<E> extends Endpoint<E>
SimpleEndpointimplementation. The EndpointKey contains the endpoint address, that will be used by aConnectorHandlerpassed toMultiEndpointPoolto establish a new client-sideConnection. Additionally, the EndpointKey contains an internal key object (getInternalKey()) that is used in theEndpoint.equals(java.lang.Object)andEndpoint.hashCode()methods.- Author:
- Alexey Stashok
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.grizzly.connectionpool.Endpoint
Endpoint.Factory
-
-
Constructor Summary
Constructors Constructor Description EndpointKey(Object internalKey, E endpointAddress)Construct EndpointKey based on the given internalKey and endpoint.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, org.glassfish.grizzly.ConnectorHandler<E> connectorHandler)EndpointKey(Object internalKey, E endpointAddress, org.glassfish.grizzly.ConnectorHandler<E> connectorHandler)Construct EndpointKey based on the given internalKey, endpoint, andConnectorHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.grizzly.GrizzlyFuture<org.glassfish.grizzly.Connection>connect()org.glassfish.grizzly.ConnectorHandler<E>getConnectorHandler()EgetEndpoint()ObjectgetId()ObjectgetInternalKey()EgetLocalEndpoint()StringtoString()
-
-
-
Constructor Detail
-
EndpointKey
public EndpointKey(Object internalKey, E endpointAddress)
Construct EndpointKey based on the given internalKey and endpoint.- Parameters:
internalKey- the internal key to be used inEndpoint.equals(java.lang.Object)andEndpoint.hashCode()methodsendpointAddress- the endpoint address, that will be used by aConnectorHandlerpassed toMultiEndpointPoolto establish new client-sideConnection
-
EndpointKey
public EndpointKey(Object internalKey, E endpointAddress, E localEndpointAddress)
Construct EndpointKey based on the given internalKey, endpoint, and local endpoint.- Parameters:
internalKey- the internal key to be used inEndpoint.equals(java.lang.Object)andEndpoint.hashCode()methodsendpointAddress- the endpoint address, that will be used by aConnectorHandlerpassed toMultiEndpointPoolto establish new client-sideConnectionlocalEndpointAddress- the local address that will be used by theConnectorHandlerto bind the local side of the outgoing connection.
-
EndpointKey
public EndpointKey(Object internalKey, E endpointAddress, org.glassfish.grizzly.ConnectorHandler<E> connectorHandler)
Construct EndpointKey based on the given internalKey, endpoint, andConnectorHandler.- Parameters:
internalKey- the internal key to be used inEndpoint.equals(java.lang.Object)andEndpoint.hashCode()methodsendpointAddress- the endpoint address, that will be used by aConnectorHandlerpassed toMultiEndpointPoolto establish new client-sideConnectionconnectorHandler- customizedConnectorHandlerfor this endpoint
-
EndpointKey
public EndpointKey(Object internalKey, E endpointAddress, E localEndpointAddress, org.glassfish.grizzly.ConnectorHandler<E> connectorHandler)
- Parameters:
internalKey- the internal key to be used inEndpoint.equals(java.lang.Object)andEndpoint.hashCode()methodsendpointAddress- the endpoint address, that will be used by aConnectorHandlerpassed toMultiEndpointPoolto establish new client-sideConnectionlocalEndpointAddress- the local address that will be used by theConnectorHandlerto bind the local side of the outgoing connection.connectorHandler- customizedConnectorHandlerfor this endpoint
-
-
Method Detail
-
connect
public org.glassfish.grizzly.GrizzlyFuture<org.glassfish.grizzly.Connection> connect()
-
getInternalKey
public Object getInternalKey()
- Returns:
- the internal key used in
Endpoint.equals(java.lang.Object)andEndpoint.hashCode()methods
-
getEndpoint
public E getEndpoint()
- Returns:
- the endpoint address, used by a
ConnectorHandlerpassed toMultiEndpointPoolto establish new client-sideConnection
-
getLocalEndpoint
public E getLocalEndpoint()
- Returns:
- the local endpoint address that be bound to when making the outgoing connection.
-
getConnectorHandler
public org.glassfish.grizzly.ConnectorHandler<E> getConnectorHandler()
- Returns:
- a customized
ConnectorHandler, which will be used to createConnections to this endpoint.
-
-