ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.contact
Class ContactInstantiationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by umontreal.iro.lecuyer.contactcenters.contact.ContactInstantiationException
All Implemented Interfaces:
Serializable

public class ContactInstantiationException
extends RuntimeException

This exception is thrown when a contact factory cannot instantiate a contact on a call to its ContactFactory.newInstance() method.

See Also:
Serialized Form

Constructor Summary
ContactInstantiationException(ContactFactory factory)
          Constructs a new contact instantiation exception with no message, no cause, and thrown by the given factory.
ContactInstantiationException(ContactFactory factory, String message)
          Constructs a new contact instantiation exception with the given message, no cause, and concerning factory.
ContactInstantiationException(ContactFactory factory, String message, Throwable cause)
          Constructs a new contact instantiation exception with the given message, the supplied cause, and concerning factory.
ContactInstantiationException(ContactFactory factory, Throwable cause)
          Constructs a new contact instantiation exception with no message, the given cause, and concerning factory.
 
Method Summary
 ContactFactory getContactFactory()
          Returns the contact factory concerned by this exception.
 String toString()
          Returns a short description of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContactInstantiationException

public ContactInstantiationException(ContactFactory factory)
Constructs a new contact instantiation exception with no message, no cause, and thrown by the given factory.

Parameters:
factory - the contact factory having thrown the exception.

ContactInstantiationException

public ContactInstantiationException(ContactFactory factory,
                                     String message)
Constructs a new contact instantiation exception with the given message, no cause, and concerning factory.

Parameters:
factory - the contact factory concerned by the exception.
message - the error message describing the exception.

ContactInstantiationException

public ContactInstantiationException(ContactFactory factory,
                                     Throwable cause)
Constructs a new contact instantiation exception with no message, the given cause, and concerning factory.

Parameters:
factory - the contact factory concerned by the exception.
cause - the cause of the exception.

ContactInstantiationException

public ContactInstantiationException(ContactFactory factory,
                                     String message,
                                     Throwable cause)
Constructs a new contact instantiation exception with the given message, the supplied cause, and concerning factory.

Parameters:
factory - the contact factory concerned by the exception.
message - the error message describing the exception.
cause - the cause of the exception.
Method Detail

getContactFactory

public ContactFactory getContactFactory()
Returns the contact factory concerned by this exception.

Returns:
the contact factory concerned by this exception.

toString

public String toString()
Returns a short description of the exception. If getContactFactory() returns null, this calls super.toString. Otherwise, the result is the concatenation of the strings:

Overrides:
toString in class Throwable
Returns:
a string representation of the exception.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.