public abstract class StdioConnector extends AbstractConnector
StdioConnector
can send and receive Mule events over IO streams.Modifier and Type | Field and Description |
---|---|
protected InputStream |
inputStream |
protected OutputStream |
outputStream |
static String |
STDIO |
static String |
STREAM_SYSTEM_ERR |
static String |
STREAM_SYSTEM_IN |
static String |
STREAM_SYSTEM_OUT |
createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatcherPoolFactory, dispatchers, initialStateStopped, lifecycleManager, logger, muleContext, muleMessageFactory, name, numberOfConcurrentTransactedReceivers, PROPERTY_POLLING_FREQUENCY, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, startOnConnect
INT_VALUE_NOT_SET
PHASE_NAME
Constructor and Description |
---|
StdioConnector(MuleContext context) |
Modifier and Type | Method and Description |
---|---|
MessageReceiver |
createReceiver(FlowConstruct flowConstruct,
InboundEndpoint endpoint)
Create a Message receiver for this connector
|
protected void |
doDispose()
Template method to perform any work when destroying the connectoe
|
void |
doStart()
Template method to perform any work when starting the connectoe
|
void |
doStop()
Template method to perform any work when stopping the connectoe
|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
String |
getProtocol() |
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.
|
void |
setInputStream(InputStream inputStream) |
void |
setOutputStream(OutputStream outputStream) |
borrowDispatcher, clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDefaultRedeliveryPolicy, createDispatcherMessageProcessor, createMuleMessageFactory, createOperationResource, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doConnect, doDisconnect, doInitialise, doUnregisterListener, fireNotification, getCanonicalURI, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherPoolFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOperationResourceFactory, getOutboundExchangePatterns, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, getTransactionalResource, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isConnecting, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialised, isInitialStateStopped, isResponseEnabled, isStarted, isStarting, isStopped, isStopping, isValidateConnections, lookupReceiver, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, returnDispatcher, setConnected, setConnecting, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherPoolFactory, setDispatcherPoolMaxWait, setDispatcherPoolWhenExhaustedAction, setDispatcherThreadingProfile, setDynamicNotification, setInitialStateStopped, setMaxDispatchersActive, setMaxRequestersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterPoolMaxWait, setRequesterPoolWhenExhaustedAction, setRequesterThreadingProfile, setRetryPolicyTemplate, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, setValidateConnections, shutdownScheduler, start, startAfterConnect, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, validateConnection, workAccepted, workCompleted, workRejected, workStarted
public static final String STDIO
public static final String STREAM_SYSTEM_IN
public static final String STREAM_SYSTEM_OUT
public static final String STREAM_SYSTEM_ERR
protected OutputStream outputStream
protected InputStream inputStream
public StdioConnector(MuleContext context)
public MessageReceiver createReceiver(FlowConstruct flowConstruct, InboundEndpoint endpoint) throws Exception
AbstractConnector
createReceiver
in class AbstractConnector
flowConstruct
- the service that will receive events from this receiver, the
listenerendpoint
- the endpoint that defies this inbound communicationTransportServiceDescriptor
initialised using the service and endpoint.Exception
- if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrownpublic void doStop()
AbstractConnector
doStop
in class AbstractConnector
protected void doDispose()
AbstractConnector
doDispose
in class AbstractConnector
public void doStart()
AbstractConnector
doStart
in class AbstractConnector
public String getProtocol()
public InputStream getInputStream()
public void setInputStream(InputStream inputStream)
public OutputStream getOutputStream()
public void setOutputStream(OutputStream outputStream)
public void registerListener(InboundEndpoint endpoint, MessageProcessor listener, FlowConstruct flowConstruct) throws Exception
Connector
registerListener
in interface Connector
registerListener
in class AbstractConnector
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
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.