com.ibm.able.conversation
Class ProtocolErrorEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.ibm.able.conversation.ConversationEvent
|
+--com.ibm.able.conversation.ProtocolErrorEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class ProtocolErrorEvent
- extends ConversationEvent
ConversationEvent for protocol errors (e.g., unexpected message).
OLD VERSION -- TO BE DELETED
Q: Why make this an event, rather than an exception?
A: Because protocol errors are not programming errors; they are
business-as-usual for agents. We reserve the use of exceptions to
programming errors. Agents will typically handle protocol errors in
much the same way as decision requests: some module of decision logic
will be called to determine what action to take next.
Q: But if fact, that's not true. There's only one kind of protocol error
that is not a programming error: receipt of an unexpected message. All
other types of protocol error have to do with something we're doing
wrong.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NO_SUCH_TRANSITION
public static final int NO_SUCH_TRANSITION
ROLE_VIOLATION
public static final int ROLE_VIOLATION
ProtocolErrorEvent
public ProtocolErrorEvent(java.lang.Object source)
ProtocolErrorEvent
public ProtocolErrorEvent(java.lang.Object source,
int newType,
ConversationEvent newEvent,
java.lang.String newDescription)
getType
public int getType()
setType
public void setType(int newType)
isValidType
public static boolean isValidType(int testType)
getTypeString
public static java.lang.String getTypeString(int testType)
getBadEvent
public ConversationEvent getBadEvent()
setBadEvent
public void setBadEvent(ConversationEvent newEvent)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String newDescription)
toString
public java.lang.String toString()
- Returns a text summary of this object, intended for human eyes.
- Overrides:
toString
in class java.util.EventObject
(C) Copyright IBM Corporation 1999, 2003