Toggle navigation
Home
org.eclipse.jetty.util.Promise<org.eclipse.jetty.client.api.Connection> to org.eclipse.jetty.util.Callback
No. of Instances - 3
No. of Commits - 1
No. of Projects - {'jetty.project'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Rename Variable
connectionPromise
to
requester
connectionPromise
to
requester
connectionPromise
to
requester
connectionPromise
to
requester
connectionPromise
to
requester
Add or Remove Method invocation
connectionPromise.succeeded(connection)
to
idle(connection,true)
connectionPromise.failed(new IllegalStateException("Active connection overflow"))
to
requester.succeeded()
Update Anonymous class
{ @Override public void succeeded( Connection connection){ if (LOG.isDebugEnabled()) LOG.debug("Connection {}/{} creation succeeded {}",next,maxConnections,connection); if (activate(connection)) connectionPromise.succeeded(connection); else connectionPromise.failed(new IllegalStateException("Active connection overflow")); } @Override public void failed( Throwable x){ if (LOG.isDebugEnabled()) LOG.debug("Connection " + next + "/"+ maxConnections+ " creation failed",x); connectionCount.decrementAndGet(); connectionPromise.failed(x); } }
to
{ @Override public void succeeded( Connection connection){ if (LOG.isDebugEnabled()) LOG.debug("Connection {}/{} creation succeeded {}",next,maxConnections,connection); idle(connection,true); requester.succeeded(); } @Override public void failed( Throwable x){ if (LOG.isDebugEnabled()) LOG.debug("Connection " + next + "/"+ maxConnections+ " creation failed",x); connectionCount.decrementAndGet(); requester.failed(x); } }