|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Connector
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.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Startable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Stoppable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Method Summary | |
|---|---|
void |
dispatch(OutboundEndpoint endpoint,
MuleEvent event)
Dispatches an event from the endpoint to the external system |
MessageDispatcherFactory |
getDispatcherFactory()
The dispatcher factory is used to create a message dispatcher of the current request |
ExceptionListener |
getExceptionListener()
|
MessageAdapter |
getMessageAdapter(Object message)
Gets a MessageAdapter from the connector for the given message
(data) |
MuleContext |
getMuleContext()
|
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()
|
boolean |
isDisposed()
|
boolean |
isResponseEnabled()
|
boolean |
isStarted()
|
boolean |
isSyncEnabled(String protocol)
Used to define is this connectors endpoints' should be synchronous by default rather than using Mule's instance wide default. |
MessageReceiver |
registerListener(Service service,
InboundEndpoint endpoint)
This creates a MessageReceiver associated with this endpoint
and registers it with the connector |
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) |
MuleMessage |
send(OutboundEndpoint endpoint,
MuleEvent event)
Sends an event from the endpoint to the external system |
void |
setDispatcherFactory(MessageDispatcherFactory factory)
The dispatcher factory is used to create a message dispatcher of the current request |
void |
setExceptionListener(ExceptionListener listener)
|
void |
setRequesterFactory(MessageRequesterFactory factory)
The requester factory is used to create a message requester of the current request |
boolean |
supportsProtocol(String protocol)
|
void |
unregisterListener(Service service,
InboundEndpoint endpoint)
|
| 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.context.MuleContextAware |
|---|
setMuleContext |
| Methods inherited from interface org.mule.api.NamedObject |
|---|
getName, setName |
| Field Detail |
|---|
static final int INT_VALUE_NOT_SET
| Method Detail |
|---|
MessageReceiver registerListener(Service service,
InboundEndpoint endpoint)
throws Exception
MessageReceiver associated with this endpoint
and registers it with the connector
service - the listening serviceendpoint - the endpoint contains the listener endpointUri on which to
listen on.
Exception - if the MessageReceiver cannot be created or the Receiver
cannot be registered
void unregisterListener(Service service,
InboundEndpoint endpoint)
throws Exception
service - the listening serviceendpoint - the associated endpointDescriptor with the listener
Exception - if the listener cannot be unregistered. If a listener is not
associated with the given endpoint this will not throw an
exceptionboolean isStarted()
boolean isConnected()
boolean isDisposed()
MessageAdapter getMessageAdapter(Object message)
throws MuleException
MessageAdapter from the connector for the given message
(data)
message - the data with which to initialise the MessageAdapter
MessageAdapter for the endpoint
MessageTypeNotSupportedException - if the message parameter is not supported
MuleException - if there is a problem creating the AdapterMessageAdapterString getProtocol()
boolean supportsProtocol(String protocol)
void setExceptionListener(ExceptionListener listener)
listener - the exception strategy to use with this endpointExceptionListenerExceptionListener getExceptionListener()
ExceptionListenervoid handleException(Exception exception)
exception - the exception that was caughtvoid setDispatcherFactory(MessageDispatcherFactory factory)
factory - the factory to use when a dispatcher request is madrMessageDispatcherFactory getDispatcherFactory()
void setRequesterFactory(MessageRequesterFactory factory)
factory - the factory to use when a request is madeMessageRequesterFactory getRequesterFactory()
boolean isResponseEnabled()
boolean isSyncEnabled(String protocol)
ImmutableEndpoint.isSynchronous()
void dispatch(OutboundEndpoint endpoint,
MuleEvent event)
throws DispatchException
event - The event to dispatch
DispatchException - if the event fails to be dispatched
@Deprecated
MuleMessage request(String uri,
long timeout)
throws Exception
uri - the endpoint uri to use when connecting to the resourcetimeout - 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
Exception - if the call to the underlying protocal cuases an exception
MuleMessage request(InboundEndpoint endpoint,
long timeout)
throws Exception
endpoint - the endpoint to use when connecting to the resourcetimeout - 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
Exception - if the call to the underlying protocal cuases an exception
MuleMessage send(OutboundEndpoint endpoint,
MuleEvent event)
throws DispatchException
event - The event to send
DispatchException - if the event fails to be dispatched
OutputStream getOutputStream(OutboundEndpoint endpoint,
MuleMessage message)
throws MuleException
UnsupportedOperationException
is thrown. Note that the stream MUST release resources on close. For help doing so, see
CallbackOutputStream.
endpoint - the endpoint that releates to this Dispatchermessage - the current message being processed
MuleExceptionMuleContext getMuleContext()
RetryPolicyTemplate getRetryPolicyTemplate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||