jBPM distribution 6.0.0.Beta1

org.jbpm.runtime.manager.impl
Class SingletonRuntimeManager

java.lang.Object
  extended by org.jbpm.runtime.manager.impl.AbstractRuntimeManager
      extended by org.jbpm.runtime.manager.impl.SingletonRuntimeManager
All Implemented Interfaces:
org.kie.internal.runtime.manager.RuntimeManager

public class SingletonRuntimeManager
extends AbstractRuntimeManager


Field Summary
 
Fields inherited from class org.jbpm.runtime.manager.impl.AbstractRuntimeManager
activeSingletons, environment, identifier
 
Constructor Summary
SingletonRuntimeManager()
           
SingletonRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment, org.kie.internal.runtime.manager.SessionFactory factory, org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory, String identifier)
           
 
Method Summary
 void close()
           
 void disposeRuntime(org.kie.internal.runtime.manager.Runtime runtime)
           
 org.kie.internal.runtime.manager.SessionFactory getFactory()
           
protected  String getLocation()
           
protected  int getPersistedSessionId(String location, String identifier)
          Retrieves session id from serialized file named jbpmSessionId.ser from given location.
 org.kie.internal.runtime.manager.Runtime getRuntime(org.kie.internal.runtime.manager.Context context)
           
 org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory()
           
 void init()
           
protected  void persistSessionId(String location, String identifier, int ksessionId)
          Stores gives ksessionId in a serialized file in given location under jbpmSessionId.ser file name
 void setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
           
 void setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
           
 
Methods inherited from class org.jbpm.runtime.manager.impl.AbstractRuntimeManager
getEnvironment, getIdentifier, registerDisposeCallback, registerItems, setEnvironment, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonRuntimeManager

public SingletonRuntimeManager()

SingletonRuntimeManager

public SingletonRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment,
                               org.kie.internal.runtime.manager.SessionFactory factory,
                               org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
                               String identifier)
Method Detail

init

public void init()

getRuntime

public org.kie.internal.runtime.manager.Runtime getRuntime(org.kie.internal.runtime.manager.Context context)

disposeRuntime

public void disposeRuntime(org.kie.internal.runtime.manager.Runtime runtime)

close

public void close()
Specified by:
close in interface org.kie.internal.runtime.manager.RuntimeManager
Overrides:
close in class AbstractRuntimeManager

getPersistedSessionId

protected int getPersistedSessionId(String location,
                                    String identifier)
Retrieves session id from serialized file named jbpmSessionId.ser from given location.

Parameters:
location - directory where jbpmSessionId.ser file should be
identifier - of the manager owning this ksessionId
Returns:
sessionId if file was found otherwise 0

persistSessionId

protected void persistSessionId(String location,
                                String identifier,
                                int ksessionId)
Stores gives ksessionId in a serialized file in given location under jbpmSessionId.ser file name

Parameters:
location - directory where serialized file should be stored
identifier - of the manager owning this ksessionId
ksessionId - value of ksessionId to be stored

getLocation

protected String getLocation()

getFactory

public org.kie.internal.runtime.manager.SessionFactory getFactory()

setFactory

public void setFactory(org.kie.internal.runtime.manager.SessionFactory factory)

getTaskServiceFactory

public org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory()

setTaskServiceFactory

public void setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)

jBPM distribution 6.0.0.Beta1

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.