mandala.rami.impl
Class ThreadedPolicy

java.lang.Object
  extended bymandala.rami.impl.ThreadedPolicy
All Implemented Interfaces:
AsynchronousPolicy, ConcurrentSemantic, java.io.Serializable

public class ThreadedPolicy
extends java.lang.Object
implements AsynchronousPolicy, ConcurrentSemantic, java.io.Serializable

Concurrent, threaded implementation of the AsynchronousPolicy interface.

This implementation uses the MethodInvoker for its method invocation implementation.

Version:
1.0
Author:
eipi
See Also:
ConcurrentSemantic, AsynchronousPolicy, MethodInvoker, Serialized Form

Field Summary
protected static int DELTA_PRIORITY
          new Thread is given priority equals to NORM_PRIORITY + DELTA_PRIORITY.
protected  java.lang.ThreadGroup threadGroup
           
protected static int threadPriority
          Priority of new threads.
 
Constructor Summary
ThreadedPolicy()
          Creates a new ThreadedPolicy instance.
ThreadedPolicy(java.lang.ThreadGroup threadGroup)
          Creates a new ThreadedPolicy instance.
 
Method Summary
 Cancelable call(java.lang.Object object, FutureServer futureServer)
          Asynchronous implementation of a method invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELTA_PRIORITY

protected static final int DELTA_PRIORITY

new Thread is given priority equals to NORM_PRIORITY + DELTA_PRIORITY.

See Also:
Thread, Constant Field Values

threadPriority

protected static final int threadPriority

Priority of new threads.

See Also:
Thread, Constant Field Values

threadGroup

protected transient java.lang.ThreadGroup threadGroup
Constructor Detail

ThreadedPolicy

public ThreadedPolicy()

Creates a new ThreadedPolicy instance.


ThreadedPolicy

public ThreadedPolicy(java.lang.ThreadGroup threadGroup)

Creates a new ThreadedPolicy instance.

Parameters:
threadGroup - the ThreadGroup threads must belong to
Method Detail

call

public Cancelable call(java.lang.Object object,
                       FutureServer futureServer)

Asynchronous implementation of a method invocation.

This implementation start a new thread to execute the MethodInvoker.run() metod.

Specified by:
call in interface AsynchronousPolicy
Parameters:
object - the object on which the method is to be invoked.
futureServer - a FutureServer value
Returns:
the cancelable object to use to cancel the invocation.
See Also:
MethodInvoker, FutureServer


Mandala help mailing list