Top Description Inners Methods
io.vertx.core.net.impl.pool

public Interface PoolConnector<C>

Known Direct Implementers
io.vertx.core.http.impl.SharedClientHttpStreamEndpoint
Imports
io.vertx.core.AsyncResult, .Handler, io.vertx.core.impl.ContextInternal

Defines the interactions with the actual back-end managing connections.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
PoolConnector.Listener

The contract by which the back-end can signal the pool of connection events.

Method Summary

Modifier and TypeMethod and Description
public void
connect(ContextInternal
the context to use for IO
context
,
PoolConnector.Listener
the listener
listener
,
Handler<AsyncResult<ConnectResult<C>>>
the callback handler with the result
handler
)

Connects to a back-end.

public boolean

Returns:

whether the connection is valid or not
isValid
(C
the connection to check
connection
)

Checks whether the connection is still valid.

Method Detail

connectback to summary
public void connect(ContextInternal context, PoolConnector.Listener listener, Handler<AsyncResult<ConnectResult<C>>> handler)

Connects to a back-end.

Parameters
context:ContextInternal

the context to use for IO

listener:PoolConnector.Listener

the listener

handler:Handler<AsyncResult<ConnectResult<C>>>

the callback handler with the result

isValidback to summary
public boolean isValid(C connection)

Checks whether the connection is still valid.

The pool calls this method when it checks the validity of a connection. Any connection will be evicted from the pool.

Parameters
connection:C

the connection to check

Returns:boolean

whether the connection is valid or not

io.vertx.core.net.impl.pool back to summary

public Interface PoolConnector.Listener

Known Direct Implementers
io.vertx.core.net.impl.pool.SimpleConnectionPool.Slot

The contract by which the back-end can signal the pool of connection events.

A connection listener is used for each connection in the pool.

Method Summary

Modifier and TypeMethod and Description
public void
onConcurrencyChange(long
the concurrency
concurrency
)

Signals the connection the concurrency changed to the concurrency value.

public void
onRemove()

Signal the connection needs to be remove from the pool.

Method Detail

onConcurrencyChangeback to summary
public void onConcurrencyChange(long concurrency)

Signals the connection the concurrency changed to the concurrency value.

Parameters
concurrency:long

the concurrency

onRemoveback to summary
public void onRemove()

Signal the connection needs to be remove from the pool.