Top Description Constructors Methods
org.apache.http.conn.routing

public Class BasicRouteDirector

extends Object
implements HttpRouteDirector
Class Inheritance
All Implemented Interfaces
org.apache.http.conn.routing.HttpRouteDirector
Annotations
@Contract
threading:IMMUTABLE
Imports
org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.util.Args

Basic HttpRouteDirector implementation.
Since
4.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected int

Returns:

one of the constants defined in this class, indicating either the next step to perform, or success, or failure
directStep
(final RouteInfo
the planned route
plan
,
final RouteInfo
the currently established route
fact
)

Determines the next step to establish a direct connection.

protected int

Returns:

the first step
firstStep
(final RouteInfo
the planned route
plan
)

Determines the first step to establish a route.

public int

Returns:

one of the constants defined in this class, indicating either the next step to perform, or success, or failure. 0 is for success, a negative value for failure.
nextStep
(final RouteInfo
the planned route
plan
,
final RouteInfo
the currently established route, or null if nothing is established
fact
)

Implements org.apache.http.conn.routing.HttpRouteDirector.nextStep.

Provides the next step.
protected int

Returns:

one of the constants defined in this class, indicating either the next step to perform, or success, or failure
proxiedStep
(final RouteInfo
the planned route
plan
,
final RouteInfo
the currently established route
fact
)

Determines the next step to establish a connection via proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BasicRouteDirectorback to summary
public BasicRouteDirector()

Method Detail

directStepback to summary
protected int directStep(final RouteInfo plan, final RouteInfo fact)

Determines the next step to establish a direct connection.

Parameters
plan:RouteInfo

the planned route

fact:RouteInfo

the currently established route

Returns:int

one of the constants defined in this class, indicating either the next step to perform, or success, or failure

firstStepback to summary
protected int firstStep(final RouteInfo plan)

Determines the first step to establish a route.

Parameters
plan:RouteInfo

the planned route

Returns:int

the first step

nextStepback to summary
public int nextStep(final RouteInfo plan, final RouteInfo fact)

Implements org.apache.http.conn.routing.HttpRouteDirector.nextStep.

Provides the next step.

Parameters
plan:RouteInfo

the planned route

fact:RouteInfo

the currently established route, or null if nothing is established

Returns:int

one of the constants defined in this class, indicating either the next step to perform, or success, or failure. 0 is for success, a negative value for failure.

Annotations
@Override
proxiedStepback to summary
protected int proxiedStep(final RouteInfo plan, final RouteInfo fact)

Determines the next step to establish a connection via proxy.

Parameters
plan:RouteInfo

the planned route

fact:RouteInfo

the currently established route

Returns:int

one of the constants defined in this class, indicating either the next step to perform, or success, or failure