com.webhydra.slug.process
Class UnlimitedProcessRunner

java.lang.Object
  extended by com.webhydra.slug.process.AbstractSlugService
      extended by com.webhydra.slug.process.AbstractProcessRunner
          extended by com.webhydra.slug.process.UnlimitedProcessRunner
All Implemented Interfaces:
ISlugRunner, ISlugService

public class UnlimitedProcessRunner
extends AbstractProcessRunner
implements ISlugRunner

Basic ISlugRunner implmentation without any thread restrictions.

A new thread is created and started with provided SluggishProcess.
None process or thread limitation are implemented and threads are not pulled.

Author:
rossen

Field Summary
 
Fields inherited from class com.webhydra.slug.process.AbstractProcessRunner
apl
 
Fields inherited from class com.webhydra.slug.process.AbstractSlugService
setup
 
Constructor Summary
UnlimitedProcessRunner()
          Creates a new instance of UnlimitedProcessRunner
 
Method Summary
 long activeCount()
          Returns the count of all active processes
 java.lang.String add(SluggishProcess proc, java.lang.String session)
          Add and execute a new SluggishProcess for execution.
 void prepare()
          Default empty implelemtation
 void release()
          Default implementation.
 
Methods inherited from class com.webhydra.slug.process.AbstractProcessRunner
cancelProcess, checkProcess, cleanSession, clear, consumeProcess, count, save
 
Methods inherited from class com.webhydra.slug.process.AbstractSlugService
getParams, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webhydra.slug.process.ISlugRunner
cancelProcess, checkProcess, cleanSession, clear, consumeProcess, count
 
Methods inherited from interface com.webhydra.slug.process.ISlugService
init
 

Constructor Detail

UnlimitedProcessRunner

public UnlimitedProcessRunner()
Creates a new instance of UnlimitedProcessRunner

Method Detail

prepare

public void prepare()
Default empty implelemtation

Specified by:
prepare in interface ISlugService
Overrides:
prepare in class AbstractProcessRunner

release

public void release()
Default implementation. Si,pyt invoces clean().

Specified by:
release in interface ISlugService
Overrides:
release in class AbstractProcessRunner
See Also:
AbstractProcessRunner.clear()

add

public java.lang.String add(SluggishProcess proc,
                            java.lang.String session)
                     throws java.security.InvalidParameterException
Add and execute a new SluggishProcess for execution.

Specified by:
add in interface ISlugRunner
Parameters:
proc - process to be executed.
session - current user session ID.
Returns:
Proccess ID (PID) assigned to provided process/session pair.
Throws:
java.security.InvalidParameterException - if any of the provided parameters is null.

activeCount

public long activeCount()
Returns the count of all active processes

Specified by:
activeCount in interface ISlugRunner
Returns:
the number of actively running sluggish processes.