org.jbpm.pvm.internal.svc
Class EnvironmentInterceptor

java.lang.Object
  extended by org.jbpm.pvm.internal.svc.Interceptor
      extended by org.jbpm.pvm.internal.svc.EnvironmentInterceptor
All Implemented Interfaces:
CommandService

public class EnvironmentInterceptor
extends Interceptor

sets up an environment around the execution of the command.

Author:
Tom Baeyens

Field Summary
protected  EnvironmentFactory environmentFactory
           
protected  Policy policy
           
 
Fields inherited from class org.jbpm.pvm.internal.svc.Interceptor
next
 
Fields inherited from interface org.jbpm.pvm.internal.cmd.CommandService
NAME_NEW_TX_REQUIRED_COMMAND_SERVICE, NAME_TX_REQUIRED_COMMAND_SERVICE
 
Constructor Summary
EnvironmentInterceptor()
           
 
Method Summary
<T> T
execute(Command<T> command)
           
protected
<T> T
executeInExistingEnvironment(Command<T> command)
           
protected
<T> T
executeInNewEnvironment(Command<T> command)
           
 EnvironmentFactory getEnvironmentFactory()
           
 Policy getPolicy()
           
protected  boolean isEnvironmentCreationNecessary()
           
 void setEnvironmentFactory(EnvironmentFactory environmentFactory)
           
 void setPolicy(Policy policy)
           
 
Methods inherited from class org.jbpm.pvm.internal.svc.Interceptor
getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

environmentFactory

protected EnvironmentFactory environmentFactory

policy

protected Policy policy
Constructor Detail

EnvironmentInterceptor

public EnvironmentInterceptor()
Method Detail

execute

public <T> T execute(Command<T> command)

executeInExistingEnvironment

protected <T> T executeInExistingEnvironment(Command<T> command)

executeInNewEnvironment

protected <T> T executeInNewEnvironment(Command<T> command)

isEnvironmentCreationNecessary

protected boolean isEnvironmentCreationNecessary()

getEnvironmentFactory

public EnvironmentFactory getEnvironmentFactory()

setEnvironmentFactory

public void setEnvironmentFactory(EnvironmentFactory environmentFactory)

getPolicy

public Policy getPolicy()

setPolicy

public void setPolicy(Policy policy)


Copyright © 2010 JBoss Community. All Rights Reserved.