|
||||||||||
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.AbstractMessageRequester
org.mule.transport.jcr.JcrMessageRequester
public class JcrMessageRequester
JcrMessageRequester
is responsible for receiving messages from JCR
repositories.
Field Summary |
---|
Fields inherited from class org.mule.transport.AbstractTransportMessageHandler |
---|
connected, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate |
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 |
Fields inherited from interface org.mule.api.transport.MessageRequesting |
---|
REQUEST_NO_WAIT, REQUEST_WAIT_INDEFINITELY |
Constructor Summary | |
---|---|
JcrMessageRequester(org.mule.api.endpoint.InboundEndpoint endpoint)
|
Method Summary | |
---|---|
protected void |
doConnect()
|
protected void |
doDisconnect()
|
protected void |
doDispose()
|
protected org.mule.api.MuleMessage |
doRequest(long ignoredTimeout)
Receives JCR content from the configured endpoint, using optional event properties to define the target repository item. |
javax.jcr.Session |
getSession()
|
Methods inherited from class org.mule.transport.AbstractMessageRequester |
---|
applyInboundTransformers, createLifecycleManager, getEndpoint, getRequesterName, getWorkManager, initialise, request |
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, 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.MessageRequester |
---|
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.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 JcrMessageRequester(org.mule.api.endpoint.InboundEndpoint endpoint)
Method Detail |
---|
public javax.jcr.Session getSession()
protected void doConnect() throws Exception
doConnect
in class org.mule.transport.AbstractTransportMessageHandler
Exception
protected void doDisconnect() throws Exception
doDisconnect
in class org.mule.transport.AbstractTransportMessageHandler
Exception
protected void doDispose()
doDispose
in class org.mule.transport.AbstractTransportMessageHandler
protected org.mule.api.MuleMessage doRequest(long ignoredTimeout) throws Exception
Receives JCR content from the configured endpoint, using optional event
properties to define the target repository item. Unless an exception is
thrown, a MuleMessage
will always be retrieved, possibly with a
null payload if no content was acessible.
The content is extracted from the property or properties that were targeted by the endpoint path, filters and event optional parameters.
The first step of the content fetching consists in selecting a target item
from the repository. By default, this item is a node selected by using the
path of the endpoint. Alternatively, an event property (
JcrConnector.JCR_NODE_UUID_PROPERTY
) can be used to specify the
UUID to use to select the target node: if this is done, the endpoint URI will
be ignored. A third option is to define a query (with queryStatement and
queryLanguage) that will be used to select the node. Then, if any optional
relative paths have been specified as event properties for the current
MuleEvent
( JcrConnector.JCR_NODE_RELPATH_PROPERTY
and/or JcrConnector.JCR_PROPERTY_REL_PATH_PROPERTY
), they will be
used to navigate to the actual item to use.
The second step consists in applying any JcrNodeNameFilter
or
JcrPropertyNameFilter
that could have been defined on the
endpoint to further narrow the target item from which content will be
extracted. If more than one node is selected, the first one will be
arbitrarily used as the target item and a warning will be issued. If no item
can be selected, a null payload will be used for the returned
MuleMessage
.
The final step is the content extraction that will be used as the
MuleMessage
payload. For this, the following rules apply,
depending on the target item:
List
of
values.Map
of property names and
property values (for these values, the previous two rules will apply).
doRequest
in class org.mule.transport.AbstractMessageRequester
ignoredTimeout
- ignored timeout parameter.
Exception
Property names constants
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |