synergynetframework.utils.threading
Class InvocationStore

java.lang.Object
  extended by synergynetframework.utils.threading.InvocationStore

public class InvocationStore
extends java.lang.Object

Allows for the passing of responsibility of the queueing and subsequent executing of methods in one thread to the control of another thread. Particularly useful when getting threaded events to be executed during a gameloop.

Author:
dcs0ah1

Constructor Summary
InvocationStore()
           
 
Method Summary
 void addMethodInvocation(java.lang.reflect.Method m, java.lang.Object obj, java.lang.Object[] args)
          Adds the method invocation.
 void executeAll()
          Execute all.
 void reset()
          Reset.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationStore

public InvocationStore()
Method Detail

addMethodInvocation

public void addMethodInvocation(java.lang.reflect.Method m,
                                java.lang.Object obj,
                                java.lang.Object[] args)
Adds the method invocation.

Parameters:
m - the m
obj - the obj
args - the args

executeAll

public void executeAll()
                throws java.lang.IllegalArgumentException,
                       java.lang.IllegalAccessException,
                       java.lang.reflect.InvocationTargetException
Execute all.

Throws:
java.lang.IllegalArgumentException - the illegal argument exception
java.lang.IllegalAccessException - the illegal access exception
java.lang.reflect.InvocationTargetException - the invocation target exception

reset

public void reset()
Reset.