|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.transport.AbstractTransportMessageHandler
org.mule.transport.AbstractMessageDispatcher
org.mule.transport.jcr.JcrMessageDispatcher
public class JcrMessageDispatcher
A dispatcher for writing to a JCR container.
Field Summary |
---|
Fields inherited from class org.mule.transport.AbstractMessageDispatcher |
---|
defaultOutboundTransformers, defaultResponseTransformers |
Fields inherited from class org.mule.transport.AbstractTransportMessageHandler |
---|
connected, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate |
Fields inherited from interface org.mule.api.transport.MessageDispatcher |
---|
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY |
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 | |
---|---|
JcrMessageDispatcher(org.mule.api.endpoint.OutboundEndpoint endpoint)
|
Method Summary | |
---|---|
void |
doConnect()
|
void |
doDisconnect()
|
void |
doDispatch(org.mule.api.MuleEvent event)
|
void |
doDispose()
|
org.mule.api.MuleMessage |
doSend(org.mule.api.MuleEvent event)
Sends content to the configured JCR endpoint, using optional event properties to define the target repository item and the node type name to use. |
javax.jcr.Session |
getSession()
|
Methods inherited from class org.mule.transport.AbstractMessageDispatcher |
---|
applyOutboundTransformers, applyResponseTransformers, createLifecycleManager, getDispatcherName, getEndpoint, getWorkManager, process, returnResponse, returnResponse |
Methods inherited from class org.mule.transport.AbstractTransportMessageHandler |
---|
activate, connect, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doInitialise, doStart, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopping, passivate, setEndpoint, start, stop, toString, validate, validateConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.mule.api.transport.MessageDispatcher |
---|
activate, createMuleMessage, createMuleMessage, getConnector, passivate, validate |
Methods inherited from interface org.mule.api.transport.Connectable |
---|
connect, disconnect, getConnectionDescription, isConnected, validateConnection |
Methods inherited from interface org.mule.api.lifecycle.Initialisable |
---|
initialise |
Methods inherited from interface org.mule.api.lifecycle.Startable |
---|
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
---|
stop |
Methods inherited from interface org.mule.api.lifecycle.Disposable |
---|
dispose |
Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled |
---|
getLifecycleState |
Constructor Detail |
---|
public JcrMessageDispatcher(org.mule.api.endpoint.OutboundEndpoint endpoint)
Method Detail |
---|
public javax.jcr.Session getSession()
public void doConnect() throws Exception
doConnect
in class org.mule.transport.AbstractTransportMessageHandler
Exception
public void doDisconnect() throws Exception
doDisconnect
in class org.mule.transport.AbstractTransportMessageHandler
Exception
public void doDispose()
doDispose
in class org.mule.transport.AbstractTransportMessageHandler
public void doDispatch(org.mule.api.MuleEvent event) throws Exception
doDispatch
in class org.mule.transport.AbstractMessageDispatcher
Exception
doSend
public org.mule.api.MuleMessage doSend(org.mule.api.MuleEvent event) throws Exception
Sends content to the configured JCR endpoint, using optional event properties to define the target repository item and the node type name to use.
Unless the creation of child nodes is forced by an event or endpoint property
( JcrConnector.JCR_ALWAYS_CREATE_CHILD_NODE
), the target item
where content will be stored will determined the same way as explained in the
doReceive
method.
If an existing target item is found and is a node, the appropriate
NodeTypeHandler
will
be used to convert the MuleMessage
payload into valid JCR content
(nodes and properties).
If an existing target item is found and is a property, the
MuleMessage
payload will be directly written to it, using a
simple conversion mechanism. Note that if the payload is a
Collection
, the property will be multi-valued.
If no existing target item is found or if the creation of a new node is forced
(see first paragraph), a new node will be created, under the absolute path
defined by the endpoint URI, with a content extracted from the
MuleMessage
payload and stored according to the type defined in
the event or connector property ( JcrConnector.JCR_NODE_TYPE_NAME
). If the endpoint URI points to a property and not a node, an exception will
be raised.
doSend
in class org.mule.transport.AbstractMessageDispatcher
MuleMessage
.
Exception
Property names constants
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |