Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transport.ajax.embedded
Class AjaxConnector

    java.lang.Object
      org.mule.transport.AbstractConnector
          org.mule.transport.servlet.jetty.JettyHttpConnector
              org.mule.transport.servlet.jetty.JettyHttpsConnector
                  org.mule.transport.ajax.embedded.AjaxConnector

All Implemented Interfaces:
  EventListener, javax.resource.spi.work.WorkListener, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NamedObject, TlsDirectKeyStore, TlsDirectTrustStore, TlsIndirectKeyStore, TlsIndirectTrustStore, TlsProtocolHandler, Connectable, Connector, BayeuxAware

    public class AjaxConnector

extends JettyHttpsConnector
implements BayeuxAware

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. Note that a `@RESOURCE_BASE_PROPERTY` can be set on the ajax endpoint that provides the location of any web application resources such as html pages

Nested Class Summary

Nested classes/interfaces inherited from class org.mule.transport.servlet.jetty.JettyHttpConnector
`JettyHttpConnector.MuleReceiverConnectorHolder`

Field Summary
`static String` | `AJAX_PATH_SPEC`
`static String` | `CHANNEL_PROPERTY`
`static String` | `COMETD_CLIENT`
`static String` | `PROTOCOL`
`static String` | `REPLYTO_PARAM` This is the key that's used to retrieve the reply to destination from a `Map` that's passed into `AjaxMuleMessageFactory`.
`static String` | `RESOURCE_BASE_PROPERTY`

Fields inherited from class org.mule.transport.servlet.jetty.JettyHttpsConnector
`HTTPS, JETTY_SSL, LOCAL_CERTIFICATES, PEER_CERTIFICATES`

Fields inherited from class org.mule.transport.servlet.jetty.JettyHttpConnector
`holders, JETTY, ROOT`

Fields inherited from class org.mule.transport.AbstractConnector
`connected, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, initialStateStopped, lifecycleManager, logger, muleContext, muleMessageFactory, name, numberOfConcurrentTransactedReceivers, 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
`AjaxConnector(MuleContext context)`

Method Summary
`protected org.mortbay.jetty.AbstractConnector` | `createJettyConnector()`
`protected MessageReceiver` | `createReceiver(FlowConstruct flowConstruct, InboundEndpoint endpoint)` Create a Message receiver for this connector
`Servlet` | `createServlet(org.mortbay.jetty.Connector connector, ImmutableEndpoint endpoint)`
`protected void` | `doInitialise()`
`protected void` | `doStart()` Template method to perform any work when starting the connectoe
`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'.
`String` | `getResourceBase()`
`URL` | `getServerUrl()`
`int` | `getTimeout()`
`boolean` | `isDirectDeliver()`
`boolean` | `isJsonCommented()`
`boolean` | `isRequestAvailable()`
`protected void` | `populateContext(org.mortbay.jetty.servlet.Context context)`
`void` | `setBayeux(org.mortbay.cometd.AbstractBayeux bayeux)`
`void` | `setDirectDeliver(boolean directDeliver)`
`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` | `setResourceBase(String resourceBase)`
`void` | `setServerUrl(URL serverUrl)`
`void` | `setTimeout(int timeout)`
`protected void` | `validateSslConfig()`

Methods inherited from class org.mule.transport.servlet.jetty.JettyHttpsConnector
`getClientKeyStore, getClientKeyStorePassword, getClientKeyStoreType, getKeyManagerAlgorithm, getKeyManagerFactory, getKeyPassword, getKeyStore, getKeyStorePassword, getKeyStoreType, getProtocolHandler, getProvider, getSecurityProviderFactory, getSslType, getTrustManagerAlgorithm, getTrustManagerFactory, getTrustStore, getTrustStorePassword, getTrustStoreType, isExplicitTrustStoreOnly, isRequireClientAuthentication, setClientKeyStore, setClientKeyStorePassword, setClientKeyStoreType, setExplicitTrustStoreOnly, setKeyManagerAlgorithm, setKeyPassword, setKeyStore, setKeyStorePassword, setKeyStoreType, setProtocolHandler, setProvider, setRequireClientAuthentication, setSecurityProviderFactory, setSslType, setTrustManagerAlgorithm, setTrustManagerFactory, setTrustStore, setTrustStorePassword, setTrustStoreType`

Methods inherited from class org.mule.transport.servlet.jetty.JettyHttpConnector
`createContextHolder, doConnect, doDisconnect, doDispose, doStop, getConfigFile, getHolderKey, getHttpServer, getReceiverServlet, isUseContinuations, setConfigFile, setReceiverServlet, setUseContinuations, unregisterListener`

Methods inherited from class org.mule.transport.AbstractConnector
`clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDispatcherMessageProcessor, createMuleMessageFactory, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doUnregisterListener, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOutboundExchangePatterns, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialised, isInitialStateStopped, isResponseEnabled, isStarted, isStopped, isValidateConnections, lookupReceiver, registerListener, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, setConnected, setCreateMultipleTransactedReceivers, setDispatcherFactory, 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

### RESOURCE_BASE_PROPERTY

    public static final String RESOURCE_BASE_PROPERTY

See Also:
  Constant Field Values

### CHANNEL_PROPERTY

    public static final String CHANNEL_PROPERTY

See Also:
  Constant Field Values

### AJAX_PATH_SPEC

    public static final String AJAX_PATH_SPEC

See Also:
  Constant Field Values

### COMETD_CLIENT

    public static final String COMETD_CLIENT

See Also:
  Constant Field Values

### REPLYTO_PARAM

    public static final String REPLYTO_PARAM

  This is the key that's used to retrieve the reply to destination from a `Map` that's passed into `AjaxMuleMessageFactory`.

  See Also:
    Constant Field Values

Constructor Detail

### AjaxConnector

    public AjaxConnector(MuleContext context)

Method Detail

### getProtocol

    public String getProtocol()

  Specified by:
    `getProtocol` in interface `Connector`
  Overrides:
    `getProtocol` in class `JettyHttpsConnector`
  Returns:
    the primary protocol name for endpoints of this connector

### getServerUrl

    public URL getServerUrl()

### setServerUrl

    public void setServerUrl(URL serverUrl)

### doInitialise

    protected void doInitialise()
                         throws InitialisationException

  Overrides:
    `doInitialise` in class `JettyHttpsConnector`
  Throws:
    `InitialisationException`

### doStart

    protected void doStart()
                    throws MuleException

  Description copied from class: `AbstractConnector`
  Template method to perform any work when starting the connectoe

  Overrides:
    `doStart` in class `JettyHttpConnector`
  Throws:
    `MuleException` - if the method fails

### validateSslConfig

    protected void validateSslConfig()
                              throws InitialisationException

  Overrides:
    `validateSslConfig` in class `JettyHttpsConnector`
  Throws:
    `InitialisationException`

### getReplyToHandler

    public ReplyToHandler getReplyToHandler(ImmutableEndpoint endpoint)

  Description copied from class: `AbstractConnector`
  Getter for property 'replyToHandler'.

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

### createServlet

    public Servlet createServlet(org.mortbay.jetty.Connector connector,
                                 ImmutableEndpoint endpoint)

  Overrides:
    `createServlet` in class `JettyHttpConnector`

### populateContext

    protected void populateContext(org.mortbay.jetty.servlet.Context context)

### createJettyConnector

    protected org.mortbay.jetty.AbstractConnector createJettyConnector()

  Overrides:
    `createJettyConnector` in class `JettyHttpsConnector`

### getBayeux

    public org.mortbay.cometd.AbstractBayeux getBayeux()

  Specified by:
    `getBayeux` in interface `BayeuxAware`

### setBayeux

    public void setBayeux(org.mortbay.cometd.AbstractBayeux bayeux)

  Specified by:
    `setBayeux` in interface `BayeuxAware`

### 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 `JettyHttpConnector`
  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

### getResourceBase

    public String getResourceBase()

### setResourceBase

    public void setResourceBase(String resourceBase)

### 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)

### isDirectDeliver

    public boolean isDirectDeliver()

### setDirectDeliver

    public void setDirectDeliver(boolean directDeliver)

### getRefsThreshold

    public int getRefsThreshold()

### setRefsThreshold

    public void setRefsThreshold(int refsThreshold)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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