|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.component.framework.api.Interceptor
public abstract class Interceptor
An abstract class for JBI message interceptor.
| Field Summary | |
|---|---|
protected boolean |
active
Interceptor is always activated ie it is activated for all service units on all phases (send and accept)? |
protected PetalsComponent |
component
The JBI component of the interceptor (to enable access to all the component context) |
protected java.util.Map<java.lang.String,java.lang.String> |
componentParameters
The interceptor attributes (defined in the component descriptor). |
protected java.util.logging.Logger |
logger
The component logger |
protected java.lang.String |
name
The name of the interceptor (defined in the component descriptor). |
| Constructor Summary | |
|---|---|
Interceptor()
Creates a new instance of Interceptor |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getComponentParameters()
|
java.lang.String |
getName()
|
abstract void |
handleMessageAccept(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
Method called before the provider of service receive its request. |
abstract void |
handleMessageAcceptResponse(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
Method called before the provider of service send its response. |
abstract void |
handleMessageSent(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
Method called before the consumer of service send a request. |
abstract void |
handleMessageSentResponse(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
Method called before the consumer of service receive its response. |
void |
init(PetalsComponent component,
java.lang.String name,
boolean active,
java.util.Map<java.lang.String,java.lang.String> componentParameters,
java.util.logging.Logger logger)
Initialize the interceptor from its parameters. |
boolean |
isActive()
|
protected void |
onInit()
Initialization callback. |
void |
setActive(boolean active)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PetalsComponent component
protected java.lang.String name
protected java.util.Map<java.lang.String,java.lang.String> componentParameters
protected boolean active
protected java.util.logging.Logger logger
| Constructor Detail |
|---|
public Interceptor()
Interceptor
| Method Detail |
|---|
public final void init(PetalsComponent component,
java.lang.String name,
boolean active,
java.util.Map<java.lang.String,java.lang.String> componentParameters,
java.util.logging.Logger logger)
throws PEtALSCDKException
parameters - could not be null. The parameters are loaded by the CDK. If no
parameter has been found, the map is empty but not null.
PEtALSCDKException
protected void onInit()
throws java.lang.Exception
java.lang.Exception - an exception can be raised by the interceptor developer. If an
exception is raised, the interceptor will not be available in the
component.
public abstract void handleMessageSent(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
exchange - sonsumes - The Consumes configurationadditionalParameters - the parameters defined in the SU for this interceptor. The user can
use this map to retrieve the parameters defined in the Consume or
Provide extensions.
public abstract void handleMessageSentResponse(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
exchange - consumes - The Consumes configurationadditionalParameters - the parameters defined in the SU for this interceptor. The user can
use this map to retrieve the parameters defined in the Consume or
Provide extensions.
public abstract void handleMessageAccept(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
exchange - provides - The Provides configurationadditionalParameters - the parameters defined in the SU for this interceptor. The user can
use this map to retrieve the parameters defined in the Consume or
Provide extensions.
public abstract void handleMessageAcceptResponse(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides,
java.util.Map<java.lang.String,java.lang.String> additionalParameters)
exchange - provides - The Provides configurationadditionalParameters - the parameters defined in the SU for this interceptor. The user can
use this map to retrieve the parameters defined in the Consume or
Provide extensions.public final java.lang.String getName()
public boolean isActive()
public void setActive(boolean active)
active - the active to setpublic java.util.Map<java.lang.String,java.lang.String> getComponentParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||