ABLE 2.0.0 07/02/2003 10:25:01

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

Field Summary
static int NO_SUCH_TRANSITION
           
static int ROLE_VIOLATION
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ProtocolErrorEvent(java.lang.Object source)
           
ProtocolErrorEvent(java.lang.Object source, int newType, ConversationEvent newEvent, java.lang.String newDescription)
           
 
Method Summary
 ConversationEvent getBadEvent()
           
 java.lang.String getDescription()
           
 int getType()
           
static java.lang.String getTypeString(int testType)
           
static boolean isValidType(int testType)
           
 void setBadEvent(ConversationEvent newEvent)
           
 void setDescription(java.lang.String newDescription)
           
 void setType(int newType)
           
 java.lang.String toString()
          Returns a text summary of this object, intended for human eyes.
 
Methods inherited from class com.ibm.able.conversation.ConversationEvent
summary
 
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
 

Field Detail

NO_SUCH_TRANSITION

public static final int NO_SUCH_TRANSITION

ROLE_VIOLATION

public static final int ROLE_VIOLATION
Constructor Detail

ProtocolErrorEvent

public ProtocolErrorEvent(java.lang.Object source)

ProtocolErrorEvent

public ProtocolErrorEvent(java.lang.Object source,
                          int newType,
                          ConversationEvent newEvent,
                          java.lang.String newDescription)
Method Detail

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

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003