Class Endpoint<E>
- java.lang.Object
-
- org.glassfish.grizzly.connectionpool.Endpoint<E>
-
- Type Parameters:
E- the address type, for example for TCP transport it'sSocketAddress
- Direct Known Subclasses:
EndpointKey
public abstract class Endpoint<E> extends Object
The abstract class, which describes a pool endpoint and has a method, which creates newConnectionto the endpoint.- Author:
- Alexey Stashok
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEndpoint.FactoryConvenient Endpoint factory for cases, when user has aConnectorHandlerand endpoint address.
-
Constructor Summary
Constructors Constructor Description Endpoint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.glassfish.grizzly.GrizzlyFuture<org.glassfish.grizzly.Connection>connect()booleanequals(Object o)abstract ObjectgetId()inthashCode()protected voidonConnect(org.glassfish.grizzly.Connection connection, SingleEndpointPool<E> pool)The method is called, once newConnectionrelated to the Endpoint is established.
-
-
-
Method Detail
-
getId
public abstract Object getId()
-
connect
public abstract org.glassfish.grizzly.GrizzlyFuture<org.glassfish.grizzly.Connection> connect()
-
onConnect
protected void onConnect(org.glassfish.grizzly.Connection connection, SingleEndpointPool<E> pool)The method is called, once newConnectionrelated to the Endpoint is established.- Parameters:
connection- theConnectionpool- the pool, to which theConnectionis bound
-
-