com.ibm.tspaces
Class TupleSpaceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.ibm.tspaces.TupleSpaceException
Direct Known Subclasses:
TupleSpaceClientException, TupleSpaceCommunicationException, TupleSpaceServerException

public class TupleSpaceException
extends java.lang.Exception

A TupleSpaceException represents an exception to the normal processing of a TupleSpace.

Author:
Daniel Ford, Toby Lehman
See Also:
Field, Tuple, TupleSpace, Serialized Form

Constructor Summary
TupleSpaceException(java.lang.String msg)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object p1)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object[] messageParameters)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object p1, java.lang.Object p2)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
          Create a TupleSpace exception and record a reason for the exception.
TupleSpaceException(java.lang.String messageKey, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4, java.lang.Object p5)
          Create a TupleSpace exception and record a reason for the exception.
 
Method Summary
 boolean equals(java.lang.Object o)
          Needed because all classes that go in a Field of a Tuple must have an equals operator defined; even though the exception classes only go in there to be passed back to the client and are never put into a space, this is the way it is for now.
protected static java.util.ResourceBundle getBundle()
          Return the appropriate ResourceBundle instance.
protected static java.lang.Object[] removeNulls(java.lang.Object[] params)
          remove the nulls from the params because they will cause a problem when formatting.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSpaceException

public TupleSpaceException(java.lang.String msg)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
msg - The reason for the TupleSpace exception

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object[] messageParameters)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
messageParameters - The array of parameters to be substituted into the message string during formating

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object p1)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
p1 - a paramater to be substituted into the format string

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object p1,
                           java.lang.Object p2)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
p1 - a paramater to be substituted into the format string
p2 - a paramater to be substituted into the format string

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object p1,
                           java.lang.Object p2,
                           java.lang.Object p3)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
p1 - a paramater to be substituted into the format string
p2 - a paramater to be substituted into the format string
p3 - a paramater to be substituted into the format string

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object p1,
                           java.lang.Object p2,
                           java.lang.Object p3,
                           java.lang.Object p4)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
p1 - a paramater to be substituted into the format string
p2 - a paramater to be substituted into the format string
p3 - a paramater to be substituted into the format string
p4 - a paramater to be substituted into the format string

TupleSpaceException

public TupleSpaceException(java.lang.String messageKey,
                           java.lang.Object p1,
                           java.lang.Object p2,
                           java.lang.Object p3,
                           java.lang.Object p4,
                           java.lang.Object p5)
Create a TupleSpace exception and record a reason for the exception.
Parameters:
messageString - A localized message pattern for use by the class MessageFormat
p1 - a paramater to be substituted into the format string
p2 - a paramater to be substituted into the format string
p3 - a paramater to be substituted into the format string
p4 - a paramater to be substituted into the format string
p5 - a paramater to be substituted into the format string
Method Detail

equals

public boolean equals(java.lang.Object o)
Needed because all classes that go in a Field of a Tuple must have an equals operator defined; even though the exception classes only go in there to be passed back to the client and are never put into a space, this is the way it is for now. This equals just calls super.equals(o)
Overrides:
equals in class java.lang.Object
Returns:
super.equals(o);

removeNulls

protected static java.lang.Object[] removeNulls(java.lang.Object[] params)
remove the nulls from the params because they will cause a problem when formatting.
Parameters:
params - the original params
Returns:
the params with String "null" replaced for nulls

getBundle

protected static java.util.ResourceBundle getBundle()
Return the appropriate ResourceBundle instance. The ResourceBundle is used to get localization strings for messages.
Returns:
an instance of ResourceBundle