org.mule.transport.ajax.container
Class AjaxServletConnector

java.lang.Object
  extended by org.mule.transport.AbstractConnector
      extended by org.mule.transport.servlet.ServletConnector
          extended by org.mule.transport.ajax.container.AjaxServletConnector
All Implemented Interfaces:
EventListener, javax.resource.spi.work.WorkListener, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NameableObject, NamedObject, Connectable, Connector, BayeuxAware

public class AjaxServletConnector
extends ServletConnector
implements BayeuxAware

A servlet connector that binds to the container and makes a configured Bayeux available to dispatchers and receivers.


Field Summary
protected  org.mortbay.cometd.AbstractBayeux bayeux
           
static String PROTOCOL
           
 
Fields inherited from class org.mule.transport.servlet.ServletConnector
CHARACTER_ENCODING_PROPERTY_KEY, CONTENT_TYPE_PROPERTY_KEY, PARAMETER_MAP_PROPERTY_KEY, PARAMETER_PROPERTY_PREFIX, SERVLET, servletUrl, SESSION_ID_PROPERTY_KEY
 
Fields inherited from class org.mule.transport.AbstractConnector
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
 
Fields inherited from interface org.mule.api.transport.Connector
INT_VALUE_NOT_SET
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
AjaxServletConnector(MuleContext context)
           
 
Method Summary
protected  MessageReceiver createReceiver(FlowConstruct flowConstruct, InboundEndpoint endpoint)
          Create a Message receiver for this connector
 org.mortbay.cometd.AbstractBayeux getBayeux()
           
 String getFilters()
           
 int getInterval()
           
 int getLogLevel()
           
 int getMaxInterval()
           
 int getMultiFrameInterval()
           
 String getProtocol()
           
 int getRefsThreshold()
           
 ReplyToHandler getReplyToHandler(ImmutableEndpoint endpoint)
          Getter for property 'replyToHandler'.
 int getTimeout()
           
 boolean isJsonCommented()
           
 boolean isRequestAvailable()
           
 void setBayeux(org.mortbay.cometd.AbstractBayeux bayeux)
           
 void setFilters(String filters)
           
 void setInterval(int interval)
           
 void setJsonCommented(boolean jsonCommented)
           
 void setLogLevel(int logLevel)
           
 void setMaxInterval(int maxInterval)
           
 void setMultiFrameInterval(int multiFrameInterval)
           
 void setRefsThreshold(int refsThreshold)
           
 void setRequestAvailable(boolean requestAvailable)
           
 void setTimeout(int timeout)
           
 
Methods inherited from class org.mule.transport.servlet.ServletConnector
doConnect, doDisconnect, doDispose, doInitialise, doStart, doStop, getReceiverKey, getReceivers, getServletUrl, isUseCachedHttpServletRequest, setServletUrl, setUseCachedHttpServletRequest
 
Methods inherited from class org.mule.transport.AbstractConnector
clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDefaultRedeliveryPolicy, createDispatcherMessageProcessor, createMuleMessageFactory, createOperationResource, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doUnregisterListener, fireNotification, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherPoolFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOperationResourceFactory, getOutboundExchangePatterns, getOutputStream, getReceiver, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, 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, registerListener, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values

bayeux

protected org.mortbay.cometd.AbstractBayeux bayeux
Constructor Detail

AjaxServletConnector

public AjaxServletConnector(MuleContext context)
Method Detail

getBayeux

public org.mortbay.cometd.AbstractBayeux getBayeux()
Specified by:
getBayeux in interface BayeuxAware

setBayeux

public void setBayeux(org.mortbay.cometd.AbstractBayeux bayeux)
               throws MuleException
Specified by:
setBayeux in interface BayeuxAware
Throws:
MuleException

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface Connector
Overrides:
getProtocol in class ServletConnector
Returns:
the primary protocol name for endpoints of this connector

getInterval

public int getInterval()

setInterval

public void setInterval(int interval)

getMaxInterval

public int getMaxInterval()

setMaxInterval

public void setMaxInterval(int maxInterval)

getMultiFrameInterval

public int getMultiFrameInterval()

setMultiFrameInterval

public void setMultiFrameInterval(int multiFrameInterval)

getLogLevel

public int getLogLevel()

setLogLevel

public void setLogLevel(int logLevel)

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeout)

isJsonCommented

public boolean isJsonCommented()

setJsonCommented

public void setJsonCommented(boolean jsonCommented)

getFilters

public String getFilters()

setFilters

public void setFilters(String filters)

isRequestAvailable

public boolean isRequestAvailable()

setRequestAvailable

public void setRequestAvailable(boolean requestAvailable)

getRefsThreshold

public int getRefsThreshold()

setRefsThreshold

public void setRefsThreshold(int refsThreshold)

getReplyToHandler

public ReplyToHandler getReplyToHandler(ImmutableEndpoint endpoint)
Description copied from class: AbstractConnector
Getter for property 'replyToHandler'.

Overrides:
getReplyToHandler in class AbstractConnector
Returns:
Value for property 'replyToHandler'.

createReceiver

protected MessageReceiver createReceiver(FlowConstruct flowConstruct,
                                         InboundEndpoint endpoint)
                                  throws Exception
Description copied from class: AbstractConnector
Create a Message receiver for this connector

Overrides:
createReceiver in class AbstractConnector
Parameters:
flowConstruct - the service that will receive events from this receiver, the listener
endpoint - the endpoint that defies this inbound communication
Returns:
an instance of the message receiver defined in this connectors' TransportServiceDescriptor initialised using the service and endpoint.
Throws:
Exception - if there is a problem creating the receiver. This exception really depends on the underlying transport, thus any exception could be thrown


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.