|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.endpoint.AbstractConduitSelector
org.apache.cxf.clustering.FailoverTargetSelector
public class FailoverTargetSelector
Implements a target selection strategy based on failover to an alternate target endpoint when a transport level failure is encountered. Note that this feature changes the conduit on the fly and thus makes the Client not thread safe.
| Nested Class Summary | |
|---|---|
protected class |
FailoverTargetSelector.InvocationContext
Records the context of an invocation. |
protected static class |
FailoverTargetSelector.InvocationKey
Used to wrap an Exchange for usage as a Map key. |
| Field Summary | |
|---|---|
protected org.apache.cxf.clustering.FailoverStrategy |
failoverStrategy
|
protected Map<FailoverTargetSelector.InvocationKey,FailoverTargetSelector.InvocationContext> |
inProgress
|
| Fields inherited from class org.apache.cxf.endpoint.AbstractConduitSelector |
|---|
endpoint, KEEP_CONDUIT_ALIVE, selectedConduit |
| Constructor Summary | |
|---|---|
FailoverTargetSelector()
Normal constructor. |
|
FailoverTargetSelector(org.apache.cxf.transport.Conduit c)
Constructor, allowing a specific conduit to override normal selection. |
|
| Method Summary | |
|---|---|
void |
complete(org.apache.cxf.message.Exchange exchange)
Called on completion of the MEP for which the Conduit was required. |
protected long |
getDelayBetweenRetries()
Returns delay (in milliseconds) between retries |
protected org.apache.cxf.endpoint.Endpoint |
getFailoverTarget(org.apache.cxf.message.Exchange exchange,
FailoverTargetSelector.InvocationContext invocation)
Get the failover target endpoint, if a suitable one is available. |
protected Logger |
getLogger()
|
org.apache.cxf.clustering.FailoverStrategy |
getStrategy()
|
protected void |
overrideAddressProperty(Map<String,Object> context)
Override the ENDPOINT_ADDRESS property in the request context |
void |
prepare(org.apache.cxf.message.Message message)
Called prior to the interceptor chain being traversed. |
protected boolean |
requiresFailover(org.apache.cxf.message.Exchange exchange)
Check if the exchange is suitable for a failover. |
org.apache.cxf.transport.Conduit |
selectConduit(org.apache.cxf.message.Message message)
Called when a Conduit is actually required. |
void |
setStrategy(org.apache.cxf.clustering.FailoverStrategy strategy)
|
| Methods inherited from class org.apache.cxf.endpoint.AbstractConduitSelector |
|---|
close, getEndpoint, getSelectedConduit, replaceEndpointAddressPropertyIfNeeded, setEndpoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<FailoverTargetSelector.InvocationKey,FailoverTargetSelector.InvocationContext> inProgress
protected org.apache.cxf.clustering.FailoverStrategy failoverStrategy
| Constructor Detail |
|---|
public FailoverTargetSelector()
public FailoverTargetSelector(org.apache.cxf.transport.Conduit c)
c - specific conduit| Method Detail |
|---|
public void prepare(org.apache.cxf.message.Message message)
message - the current Messagepublic org.apache.cxf.transport.Conduit selectConduit(org.apache.cxf.message.Message message)
message -
public void complete(org.apache.cxf.message.Exchange exchange)
complete in interface org.apache.cxf.endpoint.ConduitSelectorcomplete in class org.apache.cxf.endpoint.AbstractConduitSelectorexchange - represents the completed MEPpublic void setStrategy(org.apache.cxf.clustering.FailoverStrategy strategy)
strategy - the FailoverStrategy to usepublic org.apache.cxf.clustering.FailoverStrategy getStrategy()
protected Logger getLogger()
getLogger in class org.apache.cxf.endpoint.AbstractConduitSelectorprotected long getDelayBetweenRetries()
protected boolean requiresFailover(org.apache.cxf.message.Exchange exchange)
exchange - the current Exchange
protected org.apache.cxf.endpoint.Endpoint getFailoverTarget(org.apache.cxf.message.Exchange exchange,
FailoverTargetSelector.InvocationContext invocation)
exchange - the current Exchangeinvocation - the current InvocationContext
protected void overrideAddressProperty(Map<String,Object> context)
context - the request context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||