com.apelon.apelonserver.client
Class ApelonException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.apelon.apelonserver.client.ApelonException
All Implemented Interfaces:
Serializable

public final class ApelonException
extends Exception

ApelonException is a general exception class.

An ApelonException is an exception that originates in the com.apelon.apelonserver.client package, where all of the client side communication layer resides.

ApelonException is a "Nesting Exception". It may have another exception stored in an instance variable. As such, its getMessage, printStackTrace, and toString methods may return one or multiple messages, stack traces, or string representations, respectively. Nesting Exceptions can be used to create an "exception chain" that shows error information as an exception propogates through many application layers. Exception chains assure that no error information is lost as successive application classes handle a given error case. This is especially useful in server-side error handling.

Nonetheless, ApelonException is simply an Exception object, and clients of ApelonExcetion are expected to adhere to the Exception and Throwable interfaces only.

Any other methods should simply not be used, with the exception of getNestedException, which can be used to retrieve the "cause" of this exception.

Likewise, ApelonException instances should only be created by Apelon Server classes. Clients of this API should not construct instances of this class.

ApelonException's direct superclass is not part of the public API.

Copyright: Copyright (c) 2002

Company: Apelon

Since:
DTS 1.0
Version:
1.0.0
Author:
Apelon, Inc.
See Also:
Exception, Throwable, Serialized Form

Constructor Summary
ApelonException(String s)
          This constructor is provided for the Apelon Server's internal use only.
ApelonException(String msg, Exception nested_ex, boolean isServerAvailable)
          This constructor is provided for the Apelon Server's internal use only.
ApelonException(String msg, Throwable nested_ex)
          This constructor is provided for the Apelon Server's internal use only.
 
Method Summary
 boolean isServerAvailable()
          Indicates that there was a problem communicating with the server.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApelonException

public ApelonException(String s)
This constructor is provided for the Apelon Server's internal use only. Do not create instances of this class.

Parameters:
s - exception message text

ApelonException

public ApelonException(String msg,
                       Throwable nested_ex)
This constructor is provided for the Apelon Server's internal use only. Do not create instances of this class.

Parameters:
msg - exception message text
nested_ex - nested exception

ApelonException

public ApelonException(String msg,
                       Exception nested_ex,
                       boolean isServerAvailable)
This constructor is provided for the Apelon Server's internal use only. Do not create instances of this class.

Parameters:
msg - exception message text
nested_ex - nested exception
isServerAvailable - indicates that the ApelonException was caused by a problem with the socket connection. Either the server or the network was down
Method Detail

isServerAvailable

public boolean isServerAvailable()
Indicates that there was a problem communicating with the server. The socket connection to the server was broken becuase the network is down or the server itself is no longer running.

This is a convenience method to allow clients to determine if the root cause of the problem is actually a server communication problem (i.e. the server was not running at the time of the query, or network access was interrupted).

Returns:
true if the server is up and available via the network; false if the error was caused by server communication.


Copyright © 2011. All Rights Reserved.