org.objectweb.proactive.ext.implicit
Class ImplicitService
java.lang.Object
org.objectweb.proactive.core.event.AbstractEventProducer
org.objectweb.proactive.core.body.request.RequestQueueImpl
org.objectweb.proactive.core.body.request.BlockingRequestQueueImpl
org.objectweb.proactive.ext.implicit.ImplicitService
- All Implemented Interfaces:
- java.io.Serializable, BlockingRequestQueue, RequestQueue, Implicit
public class ImplicitService
- extends BlockingRequestQueueImpl
- implements Implicit
- See Also:
- Serialized Form
Field Summary |
protected java.util.Hashtable |
shortcuts
The Hashtable for caching (shortcut/Methods) for this reified object |
static java.util.Hashtable |
shortcutsTables
The Hashtable for caching (name of class / shortcuts table) associations |
protected java.util.Hashtable |
sync
A hashtable to hold 'forbid' declarations |
Method Summary |
void |
addShortcut(java.lang.String shortcut,
java.lang.String name,
java.lang.String[] argumentstype)
Creates a shortcut shortcut for the method of name nameOfMethod
and parameters of types argumentsType . |
void |
dumpShortcutsTable()
Dumps the shortcut table to System.out |
void |
fillShortcutsTable()
Fills the shortcuts table with all obvious entries. |
void |
forbid(java.lang.String shortcut,
java.lang.String condition)
Associates a shortcut with a blocking condition. |
Request |
getOldestReadyRequest()
|
java.lang.String |
getShortcut(java.lang.reflect.Method m)
|
static boolean |
isOverloaded(java.lang.reflect.Method met,
java.lang.Class reifiedObjectClass)
Tests if there is another method with the same simple name in the class |
void |
run()
|
void |
serveOldestThatIsNot(java.lang.String s)
|
void |
setShortcutsTable()
|
Methods inherited from class org.objectweb.proactive.core.body.request.BlockingRequestQueueImpl |
add, addToFront, barrierBlockingRemove, barrierBlockingRemoveOldest, barrierRemoveOldest, blockingRemove, blockingRemove, blockingRemove, blockingRemove, blockingRemove, blockingRemoveOldest, blockingRemoveOldest, blockingRemoveOldest, blockingRemoveOldest, blockingRemoveOldest, blockingRemoveYoungest, blockingRemoveYoungest, blockingRemoveYoungest, blockingRemoveYoungest, blockingRemoveYoungest, destroy, isDestroyed, resume, suspend, waitForRequest |
Methods inherited from class org.objectweb.proactive.core.body.request.RequestQueueImpl |
addRequestQueueEventListener, clear, getInternalQueue, getOldest, getOldest, getOldest, getYoungest, getYoungest, getYoungest, hasRequest, isEmpty, iterator, notifyOneListener, processRequests, removeOldest, removeOldest, removeOldest, removeRequestQueueEventListener, removeYoungest, removeYoungest, removeYoungest, size, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.body.request.RequestQueue |
addRequestQueueEventListener, clear, getInternalQueue, getOldest, getOldest, getOldest, getYoungest, getYoungest, getYoungest, hasRequest, isEmpty, iterator, processRequests, removeOldest, removeOldest, removeOldest, removeRequestQueueEventListener, removeYoungest, removeYoungest, removeYoungest, size |
shortcuts
protected transient java.util.Hashtable shortcuts
- The Hashtable for caching (shortcut/Methods) for this reified object
shortcutsTables
public static final java.util.Hashtable shortcutsTables
- The Hashtable for caching (name of class / shortcuts table) associations
sync
protected java.util.Hashtable sync
- A hashtable to hold 'forbid' declarations
ImplicitService
public ImplicitService(UniqueID id)
forbid
public void forbid(java.lang.String shortcut,
java.lang.String condition)
throws InvalidAssociateDeclaration
- Associates a shortcut with a blocking condition.
The blocking condition is a method that return a boolean.
- Specified by:
forbid
in interface Implicit
- Throws:
InvalidAssociateDeclaration
- if one of the following is met :
- There is more than one method with name
condition
- There is no method with name
condition
- There is a method with name condition but it does not return a boolean
- There is a method with name condition but it takes arguments
run
public void run()
getOldestReadyRequest
public Request getOldestReadyRequest()
serveOldestThatIsNot
public void serveOldestThatIsNot(java.lang.String s)
dumpShortcutsTable
public void dumpShortcutsTable()
- Dumps the shortcut table to System.out
getShortcut
public java.lang.String getShortcut(java.lang.reflect.Method m)
addShortcut
public void addShortcut(java.lang.String shortcut,
java.lang.String name,
java.lang.String[] argumentstype)
- Description copied from interface:
Implicit
- Creates a shortcut
shortcut
for the method of name nameOfMethod
and parameters of types argumentsType
. This array is composed of the
fully-qualified names of the types. Wrapping and unwrapping of the primitive types
follows the same rule as in the Reflection API. For example, if a parameters is an int
,
its type should be declated as java.lang.Integer
.
- Specified by:
addShortcut
in interface Implicit
fillShortcutsTable
public void fillShortcutsTable()
- Fills the shortcuts table with all obvious entries.
An entry is obvious when there is only one method with the that name.
setShortcutsTable
public void setShortcutsTable()
isOverloaded
public static boolean isOverloaded(java.lang.reflect.Method met,
java.lang.Class reifiedObjectClass)
- Tests if there is another method with the same simple name in the class
Copyright 2001-2007 INRIA All Rights Reserved.