akka.camel.javaapi
Class UntypedProducerActor

java.lang.Object
  extended by akka.actor.UntypedActor
      extended by akka.camel.javaapi.UntypedProducerActor
All Implemented Interfaces:
Actor, CamelSupport, ProducerSupport

public abstract class UntypedProducerActor
extends UntypedActor
implements ProducerSupport

Subclass this abstract class to create an untyped producer actor. This class is meant to be used from Java.


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Constructor Summary
UntypedProducerActor()
           
 
Method Summary
 java.lang.String endpointUri()
          Returns the Camel endpoint URI to produce messages to.
 Activation getActivation()
          ''Java API'': Returns the Activation interface that can be used to wait on activation or de-activation of Camel endpoints.
 org.apache.camel.impl.DefaultCamelContext getCamelContext()
          Returns the CamelContext.
abstract  java.lang.String getEndpointUri()
          Returns the Camel endpoint URI to produce messages to.
 org.apache.camel.ProducerTemplate getProducerTemplate()
          Returns the ProducerTemplate.
 boolean isOneway()
          If set to false (default), this producer expects a response message from the Camel endpoint.
 boolean oneway()
          If set to false (default), this producer expects a response message from the Camel endpoint.
 void onReceive(java.lang.Object message)
          Default implementation of UntypedActor.onReceive
 void onRouteResponse(java.lang.Object message)
          Called after a response was received from the endpoint specified by endpointUri.
 java.lang.Object onTransformOutgoingMessage(java.lang.Object message)
          Called before the message is sent to the endpoint specified by getEndpointUri.
 java.lang.Object onTransformResponse(java.lang.Object message)
          Called before the response message is sent to original sender.
 void routeResponse(java.lang.Object msg)
          Called after a response was received from the endpoint specified by endpointUri.
 java.lang.Object transformOutgoingMessage(java.lang.Object msg)
          Called before the message is sent to the endpoint specified by endpointUri.
 java.lang.Object transformResponse(java.lang.Object msg)
          Called before the response message is sent to the original sender.
 
Methods inherited from class akka.actor.UntypedActor
getContext, getSelf, getSender, postRestart, postStop, preRestart, preStart, receive, supervisorStrategy, unhandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.camel.ProducerSupport
headersToCopy, headersToCopyDefault, preStart, produce, register
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, postStop, preRestart, receive, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.camel.CamelSupport
camel, camelContext
 

Constructor Detail

UntypedProducerActor

public UntypedProducerActor()
Method Detail

onTransformOutgoingMessage

public java.lang.Object onTransformOutgoingMessage(java.lang.Object message)
Called before the message is sent to the endpoint specified by getEndpointUri. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subclasses.

Parameters:
message - (undocumented)
Returns:
(undocumented)

onTransformResponse

public java.lang.Object onTransformResponse(java.lang.Object message)
Called before the response message is sent to original sender. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subclasses.

Parameters:
message - (undocumented)
Returns:
(undocumented)

onRouteResponse

public void onRouteResponse(java.lang.Object message)
Called after a response was received from the endpoint specified by endpointUri. The response is passed as argument. By default, this method sends the response back to the original sender if oneway is false. If oneway is true, nothing is done. This method may be overridden by subclasses (e.g. to forward responses to another actor).

Parameters:
message - (undocumented)

transformOutgoingMessage

public final java.lang.Object transformOutgoingMessage(java.lang.Object msg)
Description copied from interface: ProducerSupport
Called before the message is sent to the endpoint specified by endpointUri. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subtraits or subclasses.

Specified by:
transformOutgoingMessage in interface ProducerSupport
Parameters:
msg - (undocumented)
Returns:
(undocumented)

transformResponse

public final java.lang.Object transformResponse(java.lang.Object msg)
Description copied from interface: ProducerSupport
Called before the response message is sent to the original sender. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subtraits or subclasses.

Specified by:
transformResponse in interface ProducerSupport
Parameters:
msg - (undocumented)
Returns:
(undocumented)

routeResponse

public final void routeResponse(java.lang.Object msg)
Description copied from interface: ProducerSupport
Called after a response was received from the endpoint specified by endpointUri. The response is passed as argument. By default, this method sends the response back to the original sender if oneway is false. If oneway is true, nothing is done. This method may be overridden by subtraits or subclasses (e.g. to forward responses to another actor).

Specified by:
routeResponse in interface ProducerSupport
Parameters:
msg - (undocumented)

endpointUri

public final java.lang.String endpointUri()
Description copied from interface: ProducerSupport
Returns the Camel endpoint URI to produce messages to.

Specified by:
endpointUri in interface ProducerSupport
Returns:
(undocumented)

oneway

public final boolean oneway()
Description copied from interface: ProducerSupport
If set to false (default), this producer expects a response message from the Camel endpoint. If set to true, this producer initiates an in-only message exchange with the Camel endpoint (fire and forget).

Specified by:
oneway in interface ProducerSupport
Returns:
(undocumented)

onReceive

public final void onReceive(java.lang.Object message)
Default implementation of UntypedActor.onReceive

Specified by:
onReceive in class UntypedActor
Parameters:
message - (undocumented)

getEndpointUri

public abstract java.lang.String getEndpointUri()
Returns the Camel endpoint URI to produce messages to.

Returns:
(undocumented)

isOneway

public boolean isOneway()
If set to false (default), this producer expects a response message from the Camel endpoint. If set to true, this producer communicates with the Camel endpoint with an in-only message exchange pattern (fire and forget).

Returns:
(undocumented)

getCamelContext

public org.apache.camel.impl.DefaultCamelContext getCamelContext()
Returns the CamelContext.

Returns:
(undocumented)

getProducerTemplate

public org.apache.camel.ProducerTemplate getProducerTemplate()
Returns the ProducerTemplate.

Returns:
(undocumented)

getActivation

public Activation getActivation()
''Java API'': Returns the Activation interface that can be used to wait on activation or de-activation of Camel endpoints.

Returns:
the Activation interface