org.mule.transport
Class AbstractConnectionStrategy

java.lang.Object
  extended by org.mule.transport.AbstractConnectionStrategy
All Implemented Interfaces:
ConnectionStrategy
Direct Known Subclasses:
SimpleRetryConnectionStrategy, SingleAttemptConnectionStrategy

public abstract class AbstractConnectionStrategy
extends Object
implements ConnectionStrategy

TODO document


Field Summary
protected  Log logger
          logger used by this class
 
Constructor Summary
AbstractConnectionStrategy()
           
 
Method Summary
 void connect(Connectable connectable)
          Attempts to connect to a resource according the strategy implemented
protected abstract  void doConnect(Connectable connectable)
           
 boolean equals(Object obj)
           
protected  String getDescription(Connectable connectable)
           
 WorkManager getWorkManager()
           
 int hashCode()
           
 boolean isDoThreading()
           
abstract  void resetState()
          Resets any state stored in the retry strategy
 void setDoThreading(boolean doThreading)
           
 void setWorkManager(WorkManager workManager)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient Log logger
logger used by this class

Constructor Detail

AbstractConnectionStrategy

public AbstractConnectionStrategy()
Method Detail

connect

public final void connect(Connectable connectable)
                   throws FatalConnectException
Description copied from interface: ConnectionStrategy
Attempts to connect to a resource according the strategy implemented

Specified by:
connect in interface ConnectionStrategy
Parameters:
connectable - the object to connect to a resource
Throws:
FatalConnectException - is thrown if the strategy finally fails to make a connection.

isDoThreading

public boolean isDoThreading()

setDoThreading

public void setDoThreading(boolean doThreading)

getWorkManager

public WorkManager getWorkManager()

setWorkManager

public void setWorkManager(WorkManager workManager)

doConnect

protected abstract void doConnect(Connectable connectable)
                           throws FatalConnectException
Throws:
FatalConnectException

resetState

public abstract void resetState()
Resets any state stored in the retry strategy


getDescription

protected String getDescription(Connectable connectable)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.