org.mule.api.transport
Interface Connectable
- All Superinterfaces:
- Disposable, Initialisable, Lifecycle, Startable, Stoppable
- All Known Subinterfaces:
- Connector, MessageDispatcher, MessageReceiver, MessageRequester
- All Known Implementing Classes:
- AbstractConnector, AbstractJndiConnector, AbstractMessageDispatcher, AbstractMessageReceiver, AbstractMessageRequester, AbstractPollingMessageReceiver, AbstractTransportMessageHandler, MessageProcessorPollingConnector, MessageProcessorPollingMessageReceiver, NullConnector, TransactedPollingMessageReceiver, UnsupportedMessageDispatcher, UnsupportedMessageRequester
public interface Connectable
- extends Lifecycle
Interface for objects that should connect to a resource.
| Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
| Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
connect
void connect()
throws Exception
- Make the connection to the underlying transport. The fact that this object is
connected or not should have no influence on the lifecycle, especially the
start / stop state if applicable.
- Throws:
Exception
disconnect
void disconnect()
throws Exception
- Disconnect the from the underlying transport
- Throws:
Exception
isConnected
boolean isConnected()
- Determines if this object is connected or not
getConnectionDescription
String getConnectionDescription()
- Returns a string identifying the underlying resource
validateConnection
RetryContext validateConnection(RetryContext retryContext)
- Test whether the connector is able to connect to its resource(s).
This will allow a retry policy to go into effect in the case of failure. Implementations must
call either:
Callers should then check for
RetryContext.isOk(). The failure, if any, will be
provided via the RetryContext.getLastFailure().
- Returns:
- same retry context with status info set and any failures populated
- Throws:
Exception - if the connector fails to connect @param retryContext
Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.