org.mule.transport.ajax.embedded
Class AjaxConnector
java.lang.Object
org.mule.transport.AbstractConnector
org.mule.transport.servlet.ServletConnector
org.mule.transport.ajax.container.AjaxServletConnector
org.mule.transport.ajax.embedded.AjaxConnector
- All Implemented Interfaces:
- ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject, Connectable, Connector
public class AjaxConnector
- extends AjaxServletConnector
- implements MuleContextNotificationListener<MuleContextNotification>
Creates an 'embedded' Ajax server using Jetty and allows Mule to receiver and send events
to browsers. The browser will need to use the
mule.js
class to publish and
subscribe events.
| Fields inherited from class org.mule.transport.AbstractConnector |
connected, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, exceptionListener, initialised, initialStateStopped, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect |
| Methods inherited from class org.mule.transport.ajax.container.AjaxServletConnector |
getBayeux, getFilters, getInterval, getLogLevel, getMaxInterval, getMultiFrameInterval, getRefsThreshold, getReplyToHandler, getTimeout, isJsonCommented, isRequestAvailable, setBayeux, setFilters, setInterval, setJsonCommented, setLogLevel, setMaxInterval, setMultiFrameInterval, setRefsThreshold, setRequestAvailable, setTimeout |
| Methods inherited from class org.mule.transport.AbstractConnector |
checkDisposed, configureDispatcherPool, connect, createReceiver, createScheduler, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, doUnregisterListener, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMessageAdapter, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialStateStopped, isResponseEnabled, isStarted, isSyncEnabled, isValidateConnections, lookupReceiver, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnected, setCreateMultipleTransactedReceivers, setDispatcherPoolMaxWait, setDispatcherPoolWhenExhaustedAction, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setInitialStateStopped, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, 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 |
PROTOCOL
public static final String PROTOCOL
- See Also:
- Constant Field Values
AjaxConnector
public AjaxConnector()
getProtocol
public String getProtocol()
- Specified by:
getProtocol in interface Connector- Overrides:
getProtocol in class AjaxServletConnector
doInitialise
protected void doInitialise()
throws InitialisationException
- Overrides:
doInitialise in class ServletConnector
- Throws:
InitialisationException
onNotification
public void onNotification(MuleContextNotification notification)
- Specified by:
onNotification in interface ServerNotificationListener<MuleContextNotification>
doDispose
protected void doDispose()
- Template method to dispose any resources associated with this receiver. There
is not need to dispose the connector as this is already done by the framework
- Overrides:
doDispose in class ServletConnector
doStart
protected void doStart()
throws MuleException
- Overrides:
doStart in class ServletConnector
- Throws:
MuleException
doStop
protected void doStop()
throws MuleException
- Overrides:
doStop in class ServletConnector
- Throws:
MuleException
doConnect
protected void doConnect()
throws Exception
- Template method where any connections should be made for the connector
- Overrides:
doConnect in class ServletConnector
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Template method where any connected resources used by the connector should be
disconnected
- Overrides:
doDisconnect in class ServletConnector
- Throws:
Exception
registerListener
public MessageReceiver registerListener(Service service,
InboundEndpoint endpoint)
throws Exception
- Specified by:
registerListener in interface Connector- Overrides:
registerListener in class AjaxServletConnector
- Throws:
Exception
registerBayeuxEndpoint
public AjaxConnector.BayeuxHolder registerBayeuxEndpoint(ImmutableEndpoint endpoint)
throws MuleException
- Throws:
MuleException
destroyReceiver
public void destroyReceiver(MessageReceiver receiver,
ImmutableEndpoint endpoint)
throws Exception
- Overrides:
destroyReceiver in class AbstractConnector
- Throws:
Exception
setDispatcherFactory
public void setDispatcherFactory(MessageDispatcherFactory dispatcherFactory)
- Specified by:
setDispatcherFactory in interface Connector- Overrides:
setDispatcherFactory in class AbstractConnector
createJettyConnector
protected org.mortbay.jetty.AbstractConnector createJettyConnector()
getHttpServer
public org.mortbay.jetty.Server getHttpServer()
createServletForConnector
protected org.mortbay.cometd.continuation.ContinuationCometdServlet createServletForConnector(org.mortbay.jetty.Connector connector,
ImmutableEndpoint endpoint)
throws MuleException
- Throws:
MuleException
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.