org.mule.transport.stdio
Class PromptStdioConnector

java.lang.Object
  extended by org.mule.transport.AbstractConnector
      extended by org.mule.transport.stdio.StdioConnector
          extended by org.mule.transport.stdio.PromptStdioConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject, Connectable, Connector

public class PromptStdioConnector
extends StdioConnector

PromptStdioConnector connects to the System streams in and out by default and add some basic fuctionality for writing out prompt messages.


Field Summary
 
Fields inherited from class org.mule.transport.stdio.StdioConnector
inputStream, outputStream, STDIO, STREAM_SYSTEM_ERR, STREAM_SYSTEM_IN, STREAM_SYSTEM_OUT
 
Fields inherited from class org.mule.transport.AbstractConnector
connected, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.api.transport.Connector
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
 
Constructor Summary
PromptStdioConnector()
           
 
Method Summary
protected  void doConnect()
          Template method where any connections should be made for the connector
protected  void doDisconnect()
          Template method where any connected resources used by the connector should be disconnected
protected  void doDispose()
          Template method to perform any work when destroying the connectoe
protected  void doInitialise()
           
 void doStart()
          Template method to perform any work when starting the connectoe
 Connector getConnector()
           
 InputStream getInputStream()
           
 long getMessageDelayTime()
           
 String getOutputMessage()
           
 String getOutputMessageCode()
           
 OutputStream getOutputStream()
           
 OutputStream getOutputStream(ImmutableEndpoint endpoint, MuleMessage message)
           
 String getPromptMessage()
           
 String getPromptMessageCode()
           
 String getResourceBundle()
           
 MessageReceiver registerListener(Service service, InboundEndpoint endpoint)
          This creates a MessageReceiver associated with this endpoint and registers it with the connector
 void setMessageDelayTime(long messageDelayTime)
           
 void setOutputMessage(String outputMessage)
           
 void setOutputMessageCode(String outputMessageCode)
           
 void setPromptMessage(String promptMessage)
           
 void setPromptMessageCode(String promptMessageCode)
           
 void setResourceBundle(String resourceBundle)
           
 
Methods inherited from class org.mule.transport.stdio.StdioConnector
createReceiver, doStop, getProtocol, setInputStream, setOutputStream
 
Methods inherited from class org.mule.transport.AbstractConnector
checkDisposed, connect, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isResponseEnabled, isStarted, isSyncEnabled, isValidateConnections, lookupReceiver, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnected, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setRetryPolicyTemplate, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, setValidateConnections, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, validateConnection, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PromptStdioConnector

public PromptStdioConnector()
Method Detail

doInitialise

protected void doInitialise()
                     throws InitialisationException
Specified by:
doInitialise in class AbstractConnector
Throws:
InitialisationException

doDispose

protected void doDispose()
Description copied from class: AbstractConnector
Template method to perform any work when destroying the connectoe

Overrides:
doDispose in class StdioConnector

doConnect

protected void doConnect()
                  throws Exception
Description copied from class: AbstractConnector
Template method where any connections should be made for the connector

Specified by:
doConnect in class AbstractConnector
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Description copied from class: AbstractConnector
Template method where any connected resources used by the connector should be disconnected

Specified by:
doDisconnect in class AbstractConnector
Throws:
Exception

getInputStream

public InputStream getInputStream()
Overrides:
getInputStream in class StdioConnector

doStart

public void doStart()
Description copied from class: AbstractConnector
Template method to perform any work when starting the connectoe

Overrides:
doStart in class StdioConnector

getOutputStream

public OutputStream getOutputStream()
Overrides:
getOutputStream in class StdioConnector

getPromptMessage

public String getPromptMessage()
Returns:
Returns the promptMessage.

setPromptMessage

public void setPromptMessage(String promptMessage)
Parameters:
promptMessage - The promptMessage to set.

getPromptMessageCode

public String getPromptMessageCode()
Returns:
Returns the promptMessageCode.

setPromptMessageCode

public void setPromptMessageCode(String promptMessageCode)
Parameters:
promptMessageCode - The promptMessageCode to set.

getResourceBundle

public String getResourceBundle()
Returns:
Returns the resourceBundle.

setResourceBundle

public void setResourceBundle(String resourceBundle)
Parameters:
resourceBundle - The resourceBundle to read the message from. This property is only needed in conjunction with promptMessageCode or outputMessageCode.

getOutputMessage

public String getOutputMessage()
Returns:
Returns the outputMessage.

setOutputMessage

public void setOutputMessage(String outputMessage)
Parameters:
outputMessage - The outputMessage to set.

getOutputMessageCode

public String getOutputMessageCode()
Returns:
Returns the outputMessageCode.

setOutputMessageCode

public void setOutputMessageCode(String outputMessageCode)
Parameters:
outputMessageCode - The outputMessageCode to set.

getConnector

public Connector getConnector()

registerListener

public MessageReceiver registerListener(Service service,
                                        InboundEndpoint endpoint)
                                 throws Exception
Description copied from interface: Connector
This creates a MessageReceiver associated with this endpoint and registers it with the connector

Specified by:
registerListener in interface Connector
Overrides:
registerListener in class AbstractConnector
Parameters:
service - the listening service
endpoint - the endpoint contains the listener endpointUri on which to listen on.
Throws:
Exception - if the MessageReceiver cannot be created or the Receiver cannot be registered

getMessageDelayTime

public long getMessageDelayTime()

setMessageDelayTime

public void setMessageDelayTime(long messageDelayTime)

getOutputStream

public OutputStream getOutputStream(ImmutableEndpoint endpoint,
                                    MuleMessage message)
                             throws MuleException
Throws:
MuleException


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.