ca.quine.factorygen.test.message
Class MessageHandler
java.lang.Object
|
+--ca.quine.factorygen.test.message.MessageHandler
- All Implemented Interfaces:
- IHandler, IRegistrant
- public class MessageHandler
- extends Object
- implements IHandler
Method Summary |
Object[] |
getRegistrationKeys()
Returns an array of Objects, each one implementing hashCode
and equals , which is the group of keys by which the
implementor can be obtained from the Registrar. |
void |
handleMessage(User user,
Object message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageHandler
public MessageHandler()
getRegistrationKeys
public Object[] getRegistrationKeys()
- Description copied from interface:
IRegistrant
- Returns an array of Objects, each one implementing
hashCode
and equals
, which is the group of keys by which the
implementor can be obtained from the Registrar. For a "marshaller" that
knows how to marshal a particular Object, the Class (or classes) of the
Object might be used as a key (or keys), or a String (or Strings)
representing the name of the type (or types) handled by the marshaller
could be used as the key (or keys). For a message handler, an Integer
(or Integers) representing the message type (or types) could be used as
the key (or keys).
- Specified by:
getRegistrationKeys
in interface IRegistrant
- Returns:
- An array of Objects that represent the kinds of things the
implementor can handle.
handleMessage
public void handleMessage(User user,
Object message)
throws ClassCastException,
IllegalArgumentException
- Specified by:
handleMessage
in interface IHandler
ClassCastException
IllegalArgumentException