Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.api.transport
Interface Connector

All Superinterfaces:
  Connectable, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, NamedObject, Startable, Stoppable

All Known Implementing Classes:
  AbstractConnector, AbstractJndiConnector, AbstractMailConnector, AbstractRetrieveMailConnector, AbstractTlsRetrieveMailConnector, ActiveMQJmsConnector, ActiveMQXAJmsConnector, AjaxConnector, AjaxServletConnector, AxisConnector, AxisWsdlConnector, EjbConnector, FileConnector, FtpConnector, GmailSmtpConnector, HttpConnector, HttpPollingConnector, HttpsConnector, HttpsPollingConnector, IBeansConnector, ImapConnector, ImapsConnector, JBpmConnector, JdbcConnector, JettyHttpConnector, JettyHttpsConnector, JmsConnector, JnpConnector, MuleMQJmsConnector, MuleMQXAJmsConnector, MulticastConnector, NullConnector, PollingTcpConnector, Pop3Connector, Pop3sConnector, ProcessConnector, PromptStdioConnector, QuartzConnector, RmiConnector, ServletConnector, SmtpConnector, SmtpsConnector, SslConnector, StdioConnector, TcpConnector, TlsConnector, UdpConnector, VMConnector, WeblogicJmsConnector, WebsphereJmsConnector, XmppConnector

    public interface Connector

extends Lifecycle, NamedObject, Connectable, LifecycleStateEnabled

`Connector` is the mechanism used to connect to external systems and protocols in order to send and receive data.

Field Summary
`static int` | `INT_VALUE_NOT_SET`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Method Summary
`MuleMessageFactory` | `createMuleMessageFactory()` Creates a new `MuleMessageFactory` using what's defined in the connector's transport service descriptor.
`MessageExchangePattern` | `getDefaultExchangePattern()`
`MessageDispatcherFactory` | `getDispatcherFactory()` The dispatcher factory is used to create a message dispatcher of the current request
`List<MessageExchangePattern>` | `getInboundExchangePatterns()`
`MuleContext` | `getMuleContext()`
`List<MessageExchangePattern>` | `getOutboundExchangePatterns()`
`OutputStream` | `getOutputStream(OutboundEndpoint endpoint, MuleMessage message)` Will get the output stream for this type of transport.
`String` | `getProtocol()`
`MessageRequesterFactory` | `getRequesterFactory()` The requester factory is used to create a message requester of the current request
`RetryPolicyTemplate` | `getRetryPolicyTemplate()`
`void` | `handleException(Exception exception)`
`boolean` | `isConnected()` Determines if this object is connected or not
`boolean` | `isDisposed()`
`boolean` | `isResponseEnabled()`
`boolean` | `isStarted()`
`void` | `registerListener(InboundEndpoint endpoint, MessageProcessor listener, FlowConstruct flowConstruct)` Registers a MessageProcessor listener which will listen to new message received from a specific transport channel and then processed by the endpoint.
`MuleMessage` | `request(InboundEndpoint endpoint, long timeout)` Make a specific request to the underlying transport
`MuleMessage` | `request(String uri, long timeout)` Deprecated. Use request(ImmutableEndpoint endpoint, long timeout)
`void` | `setDispatcherFactory(MessageDispatcherFactory factory)` The dispatcher factory is used to create a message dispatcher of the current request
`void` | `setRequesterFactory(MessageRequesterFactory factory)` The requester factory is used to create a message requester of the current request
`boolean` | `supportsProtocol(String protocol)`
`void` | `unregisterListener(InboundEndpoint endpoint, FlowConstruct flowConstruct)` Unregisters the listener for the given endpoints.

Methods inherited from interface org.mule.api.NamedObject
`getName, setName`

Methods inherited from interface org.mule.api.transport.Connectable
`connect, disconnect, getConnectionDescription, validateConnection`

Methods inherited from interface org.mule.api.lifecycle.Initialisable
`initialise`

Methods inherited from interface org.mule.api.lifecycle.Startable
`start`

Methods inherited from interface org.mule.api.lifecycle.Stoppable
`stop`

Methods inherited from interface org.mule.api.lifecycle.Disposable
`dispose`

Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled
`getLifecycleState`

Field Detail

### INT_VALUE_NOT_SET

    static final int INT_VALUE_NOT_SET

See Also:
  Constant Field Values

Method Detail

### registerListener

    void registerListener(InboundEndpoint endpoint,
                          MessageProcessor listener,
                          FlowConstruct flowConstruct)
                          throws Exception

  Registers a MessageProcessor listener which will listen to new message received from a specific transport channel and then processed by the endpoint. Only a single listener can be registered for a given endpoints. Attempts to register a listener when one is already registered will fail.

  Parameters:
    `endpoint` - defines both the transport and channel/resource uri as well the processing (transformation/filtering) that should occur when the endpoint processes a new message from the transport receiver.
    `listener` - the listener that will be invoked when messages are received on the endpoint.
    `pattern` - reference to the runtime construct that the listener is part of for use as context for logging, notifications and error handling.
  Throws:
    `Exception`

### unregisterListener

    void unregisterListener(InboundEndpoint endpoint,
                            FlowConstruct flowConstruct)
                            throws Exception

  Unregisters the listener for the given endpoints. This will mean that the listener that was registered for this endpoint will no longer receive any messages.

  Parameters:
    `endpoint` -
  Throws:
    `Exception`

### isStarted

    boolean isStarted()

  Returns:
    true if the endpoint is started

### isConnected

    boolean isConnected()

  Description copied from interface: `Connectable`
  Determines if this object is connected or not

  Specified by:
    `isConnected` in interface `Connectable`

### isDisposed

    boolean isDisposed()

  Returns:
    false if the connector is alive and well or true if the connector is being destroyed

### createMuleMessageFactory

    MuleMessageFactory createMuleMessageFactory()
                                                throws CreateException

  Creates a new `MuleMessageFactory` using what's defined in the connector's transport service descriptor.

  Throws:
    `CreateException`

### getProtocol

    String getProtocol()

  Returns:
    the primary protocol name for endpoints of this connector

### supportsProtocol

    boolean supportsProtocol(String protocol)

  Returns:
    true if the protocol is supported by this connector.

### handleException

    void handleException(Exception exception)

  Parameters:
    `exception` - the exception that was caught

### setDispatcherFactory

    void setDispatcherFactory(MessageDispatcherFactory factory)

  The dispatcher factory is used to create a message dispatcher of the current request

  Parameters:
    `factory` - the factory to use when a dispatcher request is madr

### getDispatcherFactory

    MessageDispatcherFactory getDispatcherFactory()

  The dispatcher factory is used to create a message dispatcher of the current request

  Returns:
    the factory to use when a dispatcher request is madr

### setRequesterFactory

    void setRequesterFactory(MessageRequesterFactory factory)

  The requester factory is used to create a message requester of the current request

  Parameters:
    `factory` - the factory to use when a request is made

### getRequesterFactory

    MessageRequesterFactory getRequesterFactory()

  The requester factory is used to create a message requester of the current request

  Returns:
    the factory to use when a request is made

### isResponseEnabled

    boolean isResponseEnabled()

### request

    @Deprecated
    MuleMessage request(String uri,
                                   long timeout)
                        throws Exception

  Deprecated. Use request(ImmutableEndpoint endpoint, long timeout)

  Make a specific request to the underlying transport

  Parameters:
    `uri` - the endpoint uri to use when connecting to the resource
    `timeout` - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
  Returns:
    the result of the request wrapped in a MuleMessage object. Null will be returned if no data was avaialable
  Throws:
    `Exception` - if the call to the underlying protocal cuases an exception

### request

    MuleMessage request(InboundEndpoint endpoint,
                        long timeout)
                        throws Exception

  Make a specific request to the underlying transport

  Parameters:
    `endpoint` - the endpoint to use when connecting to the resource
    `timeout` - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
  Returns:
    the result of the request wrapped in a MuleMessage object. Null will be returned if no data was avaialable
  Throws:
    `Exception` - if the call to the underlying protocal cuases an exception

### getOutputStream

    OutputStream getOutputStream(OutboundEndpoint endpoint,
                                 MuleMessage message)
                                 throws MuleException

  Will get the output stream for this type of transport. Typically this will be called only when Streaming is being used on an outbound endpoint. If Streaming is not supported by this transport an `UnsupportedOperationException` is thrown. Note that the stream MUST release resources on close. For help doing so, see `CallbackOutputStream`.

  Parameters:
    `endpoint` - the endpoint that releates to this Dispatcher
    `message` - the current message being processed
  Returns:
    the output stream to use for this request
  Throws:
    `MuleException`

### getMuleContext

    MuleContext getMuleContext()

### getRetryPolicyTemplate

    RetryPolicyTemplate getRetryPolicyTemplate()

### getDefaultExchangePattern

    MessageExchangePattern getDefaultExchangePattern()

  Returns:
    the default `MessageExchangePattern` as configured in the transport's service descriptor.

### getInboundExchangePatterns

    List<MessageExchangePattern> getInboundExchangePatterns()

  Returns:
    List of exchange patterns that this connector supports for inbound endpoints.

### getOutboundExchangePatterns

    List<MessageExchangePattern> getOutboundExchangePatterns()

  Returns:
    List of exchange patterns that this connector supports for outbound endpoints.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.