com.buildforge.services.common.api
Class ProtocolException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.buildforge.services.common.ServiceException
              extended by com.buildforge.services.common.api.ProtocolException
All Implemented Interfaces:
java.io.Serializable

public class ProtocolException
extends ServiceException

Internationalized exceptions for the API protocol layer.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.buildforge.services.common.ServiceException
ServiceException.WrappedServiceException
 
Field Summary
 
Fields inherited from class com.buildforge.services.common.ServiceException
CLASS
 
Constructor Summary
ProtocolException(MessageDBO msg)
          Construct a new ProtocolException from a pre-built message.
ProtocolException(MessageDBO msg, java.lang.Throwable cause)
          Construct a new ProtocolException from a pre-built message.
ProtocolException(java.lang.String id)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, int arg)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, int arg, java.lang.Throwable cause)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, java.lang.String arg)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, java.lang.String[] args)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, java.lang.String[] args, java.lang.Throwable cause)
          Construct a new ProtocolException
ProtocolException(java.lang.String id, java.lang.String arg, java.lang.Throwable cause)
          Construct a new ProtocolException.
ProtocolException(java.lang.String id, java.lang.Throwable cause)
          Construct a new ProtocolException.
 
Method Summary
static ProtocolException corrupted()
          Returns an exception to indicate that the protocol stream is permanently corrupted and can no longer be used.
 
Methods inherited from class com.buildforge.services.common.ServiceException
getMessage, getMessageKey, getMessageObject, wrap
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProtocolException

public ProtocolException(MessageDBO msg)
Construct a new ProtocolException from a pre-built message. The cause will not be initialized.

Parameters:
msg - the internationalized error message
Throws:
java.lang.NullPointerException - if msg is null

ProtocolException

public ProtocolException(MessageDBO msg,
                         java.lang.Throwable cause)
Construct a new ProtocolException from a pre-built message.

Parameters:
msg - the internationalized error message
cause - an exception that caused this exception to occur
Throws:
java.lang.NullPointerException - if msg is null

ProtocolException

public ProtocolException(java.lang.String id)
Construct a new ProtocolException. The message must not require any arguments, and the cause will be left uninitialized.

Parameters:
id - a unique error id for a translatable message

ProtocolException

public ProtocolException(java.lang.String id,
                         java.lang.String[] args)
Construct a new ProtocolException. The cause will not be initialized.

Parameters:
id - a unique error id for a translatable message
args - arguments for the translation

ProtocolException

public ProtocolException(java.lang.String id,
                         int arg)
Construct a new ProtocolException. The cause will not be initialized. This is a convenience method for the fairly common case where the exception message takes a single integer as its argument.

Parameters:
id - a unique error id for a translatable message
arg - a single argument for the translation

ProtocolException

public ProtocolException(java.lang.String id,
                         java.lang.String arg)
Construct a new ProtocolException. The cause will not be initialized. This is a convenience method for the fairly common case where the exception message takes a single String as its argument.

Parameters:
id - a unique error id for a translatable message
arg - a single argument for the translation

ProtocolException

public ProtocolException(java.lang.String id,
                         java.lang.Throwable cause)
Construct a new ProtocolException. The message must not require any arguments.

Parameters:
id - a unique error id for a translatable message
cause - the exception to use when initializing the cause

ProtocolException

public ProtocolException(java.lang.String id,
                         java.lang.String[] args,
                         java.lang.Throwable cause)
Construct a new ProtocolException

Parameters:
id - a unique error id for a translatable message
args - arguments for the translation
cause - the exception to use when initializing the cause

ProtocolException

public ProtocolException(java.lang.String id,
                         int arg,
                         java.lang.Throwable cause)
Construct a new ProtocolException. This is a convenience method for the fairly common case where the exception message takes a single integer as its argument.

Parameters:
id - a unique error id for a translatable message
arg - a single argument for the translation
cause - the exception to use when initializing the cause

ProtocolException

public ProtocolException(java.lang.String id,
                         java.lang.String arg,
                         java.lang.Throwable cause)
Construct a new ProtocolException. This is a convenience method for the fairly common case where the exception message takes a single String as its argument.

Parameters:
id - a unique error id for a translatable message
arg - a single argument for the translation
cause - the exception to use when initializing the cause
Method Detail

corrupted

public static ProtocolException corrupted()
Returns an exception to indicate that the protocol stream is permanently corrupted and can no longer be used.