edu.rit.m2mi
Class InvocationQueue

java.lang.Object
  extended by edu.rit.m2mi.InvocationQueue

public class InvocationQueue
extends Object

Class InvocationQueue provides a queue of Invocation objects waiting to be processed. An invocation object is added to the invocation queue when a method is called on a handle or when an incoming M2MI message arrives from the network. One or more InvocationThreads perform the actual method invocations on the target objects of the invocation objects in the invocation queue.

Note: Class InvocationQueue is multiple thread safe.


Constructor Summary
InvocationQueue()
          Construct a new, empty invocation queue.
 
Method Summary
 void add(Invocation invocation)
          Add the given invocation object to the end of this invocation queue.
 void invokeNext()
          Invoke the target method on the next target object in the invocation object at the front of this invocation queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationQueue

public InvocationQueue()
Construct a new, empty invocation queue.

Method Detail

add

public void add(Invocation invocation)
Add the given invocation object to the end of this invocation queue.

Parameters:
invocation - Invocation object.
Throws:
NullPointerException - (unchecked exception) Thrown if invocation is null.

invokeNext

public void invokeNext()
                throws InterruptedException
Invoke the target method on the next target object in the invocation object at the front of this invocation queue. invokeNext() blocks until there actually is a target object to invoke.

Throws:
InterruptedException - Thrown if the calling thread is interrupted while blocked in this method.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.