public abstract class AbstractConnectionStrategy extends Object implements ConnectionStrategy, MuleContextAware
| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal |
isInitialThread |
protected org.apache.commons.logging.Log |
logger |
protected Object |
reconnectLock |
| Constructor and Description |
|---|
AbstractConnectionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(Connectable connectable)
Attempts to connect to a resource according the strategy implemented
|
protected void |
connectAfterServerStartup(Connectable connectable) |
protected void |
connectImmediately(Connectable connectable) |
protected abstract void |
doConnect(Connectable connectable) |
boolean |
equals(Object obj) |
protected String |
getDescription(Connectable connectable) |
MuleContext |
getMuleContext() |
int |
hashCode() |
boolean |
isConnecting() |
boolean |
isDoThreading() |
boolean |
isInitialThread() |
abstract void |
resetState()
Resets any state stored in the retry strategy
|
void |
setDoThreading(boolean doThreading) |
void |
setMuleContext(MuleContext muleContext) |
protected transient org.apache.commons.logging.Log logger
protected final Object reconnectLock
protected ThreadLocal isInitialThread
public final void connect(Connectable connectable) throws FatalConnectException
ConnectionStrategyconnect in interface ConnectionStrategyconnectable - the object to connect to a resourceFatalConnectException - is thrown if the strategy finally fails to make
a connection.public boolean isDoThreading()
public void setDoThreading(boolean doThreading)
public boolean isConnecting()
public boolean isInitialThread()
public MuleContext getMuleContext()
public void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwareprotected abstract void doConnect(Connectable connectable) throws FatalConnectException
FatalConnectExceptionpublic abstract void resetState()
protected String getDescription(Connectable connectable)
protected void connectAfterServerStartup(Connectable connectable) throws FatalConnectException
FatalConnectExceptionprotected void connectImmediately(Connectable connectable) throws FatalConnectException
FatalConnectExceptionCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.