|
||||||||||
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.Disposable |
---|
PHASE_NAME |
Method Summary | |
---|---|
AbstractRedeliveryPolicy |
createDefaultRedeliveryPolicy(int maxRedelivery)
|
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,
MuleEvent event)
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()
|
SessionHandler |
getSessionHandler()
|
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.NameableObject |
---|
setName |
Methods inherited from interface org.mule.api.NamedObject |
---|
getName |
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 |
---|
static final int INT_VALUE_NOT_SET
Method Detail |
---|
void registerListener(InboundEndpoint endpoint, MessageProcessor listener, FlowConstruct flowConstruct) throws Exception
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.flowConstruct
- reference to the flow construct that the listener is part
of for use as context for logging, notifications and error
handling.
Exception
void unregisterListener(InboundEndpoint endpoint, FlowConstruct flowConstruct) throws Exception
Exception
boolean isStarted()
boolean isConnected()
Connectable
isConnected
in interface Connectable
boolean isDisposed()
MuleMessageFactory createMuleMessageFactory() throws CreateException
MuleMessageFactory
using what's defined in the connector's
transport service descriptor.
CreateException
String getProtocol()
boolean supportsProtocol(String protocol)
void 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()
@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 exceptionMuleMessage 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 exceptionOutputStream getOutputStream(OutboundEndpoint endpoint, MuleEvent event) 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 Dispatcherevent
- the current event being processed
MuleException
MuleContext getMuleContext()
RetryPolicyTemplate getRetryPolicyTemplate()
MessageExchangePattern getDefaultExchangePattern()
MessageExchangePattern
as configured in the
transport's service descriptor.List<MessageExchangePattern> getInboundExchangePatterns()
List<MessageExchangePattern> getOutboundExchangePatterns()
SessionHandler getSessionHandler()
AbstractRedeliveryPolicy createDefaultRedeliveryPolicy(int maxRedelivery)
maxRedelivery
- times to try message redelivery
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |