|
||||||||||
| 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 Map<String,String> |
componentParameters
The interceptor attributes (defined in the component descriptor). |
protected Logger |
logger
The component logger |
protected String |
name
The name of the interceptor (defined in the component descriptor). |
| Constructor Summary | |
|---|---|
Interceptor()
Creates a new instance of Interceptor |
|
| Method Summary | |
|---|---|
Map<String,String> |
getComponentParameters()
|
String |
getName()
|
abstract void |
handleMessageAccept(Exchange exchange,
org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides,
Map<String,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,
Map<String,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,
Map<String,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,
Map<String,String> additionalParameters)
Method called before the consumer of service receive its response. |
void |
init(PetalsComponent component,
String name,
boolean active,
Map<String,String> componentParameters,
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 String name
protected Map<String,String> componentParameters
protected boolean active
protected Logger logger
| Constructor Detail |
|---|
public Interceptor()
Interceptor
| Method Detail |
|---|
public final void init(PetalsComponent component,
String name,
boolean active,
Map<String,String> componentParameters,
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 Exception
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,
Map<String,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,
Map<String,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,
Map<String,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,
Map<String,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 String getName()
public boolean isActive()
public void setActive(boolean active)
active - the active to setpublic Map<String,String> getComponentParameters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||