ibis.gmi
Class GroupSkeleton

java.lang.Object
  extended byibis.gmi.GroupSkeleton
All Implemented Interfaces:
GroupProtocol

public abstract class GroupSkeleton
extends java.lang.Object
implements GroupProtocol

The GroupSkeleton class serves as a base class for generated skeletons. It also has methods for reply combining.


Field Summary
 
Fields inherited from interface ibis.gmi.GroupProtocol
BARRIER, BARRIER_FAILED, BARRIER_OK, COMBINE, COMBINE_RESULT, COMBINED_FAILED, COMBINED_OK, CREATE_FAILED, CREATE_GROUP, CREATE_OK, DEFINE_COMBINED, FIND_GROUP, GROUP_NOT_READY, GROUP_OK, GROUP_UNKNOWN, INVOCATION, INVOCATION_BINCOMBINE, INVOCATION_FLATCOMBINE, INVOCATION_REPLY, JOIN_FULL, JOIN_GROUP, JOIN_ILLEGAL_RANK, JOIN_OK, JOIN_RANK_TAKEN, JOIN_TIMEOUT, JOIN_UNKNOWN, JOIN_WRONG_TYPE, REGISTRY, REGISTRY_REPLY, RESULT_BOOLEAN, RESULT_BYTE, RESULT_CHAR, RESULT_DOUBLE, RESULT_EXCEPTION, RESULT_FLOAT, RESULT_INT, RESULT_LONG, RESULT_OBJECT, RESULT_SHORT, RESULT_VOID
 
Constructor Summary
GroupSkeleton()
          Constructor.
 
Method Summary
 void handleCombineMessage(ReadMessage m)
          Receives a COMBINE or a COMBINE_RESULT message.
abstract  void handleMessage(int invocationMode, int resultMode, ReadMessage r)
          To be redefined by the skeletons.
 void init(GroupMember dest)
          Initializes the skeleton further once the group is complete.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupSkeleton

public GroupSkeleton()
Constructor.

Method Detail

init

public void init(GroupMember dest)
Initializes the skeleton further once the group is complete.

Parameters:
dest - the group member to which this skeleton belongs

handleCombineMessage

public final void handleCombineMessage(ReadMessage m)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Receives a COMBINE or a COMBINE_RESULT message. It is placed in a group message and enqueued in the proper queue, and any waiters are notified.

Parameters:
m - the message received
Throws:
java.io.IOException - is thrown on IO error.
java.lang.ClassNotFoundException - is thrown when an object is read whose class could not be found.

handleMessage

public abstract void handleMessage(int invocationMode,
                                   int resultMode,
                                   ReadMessage r)
                            throws IbisException,
                                   java.io.IOException
To be redefined by the skeletons. Deals with an INVOCATION message.

Parameters:
invocationMode - summary of the invocation scheme of this invocation
resultMode - summary of the result scheme of this invocation
r - the message
Throws:
IbisException - is thrown when the result is an exception; the nested exception is this result exception.
java.io.IOException - is thrown on IO error.


The Ibis project