Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl Class Reference

Inheritance diagram for alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl:

Inheritance graph
[legend]
Collaboration diagram for alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void displayMessage ()
void badMethod (short depth) throws GenericErrorEx
void corbaSystemException () throws org.omg.CORBA.SystemException
void exceptionFromCompletion (short depth) throws GenericErrorEx
void typeException (short depth) throws ACSErrTypeCommonEx
Completion completionFromException (short depth)
Completion completionFromCompletion (short depth)
Completion completionOnStack (short depth)
void outCompletion (alma.ACSErr.CompletionHolder comp)

Private Member Functions

void internalBadMethod (int depth) throws AcsJGenericErrorEx
AcsJCompletion internalCompletionMethod (int depth)

Detailed Description

Implementation of the ErrorComponent interface, which should demonstrate proper use of the ACS error system in Java.

Note on logging: unlike in the C++ implementation of this component, here we do not log the invocation of every method, because the Java container does this automatically. In general the component should only trace the invocations itself if it needs to add custom data to the log.

Author:
hsommer


Member Function Documentation

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::badMethod short  depth  )  throws GenericErrorEx [inline]
 

An intentionally bad method that throws an exception (GenericErrorEx) if depth > 0. This exception has causing exception if depth > 1. All exceptions get added to the ErrorTrace list which will transport them over CORBA.

Note that the thrown CORBA exception GenericErrorEx only acts as a vehicle for the embedded ErrorTrace linked list which contains the real data of the exception(s).

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::badMethod(short)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

Completion alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::completionFromCompletion short  depth  )  [inline]
 

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::completionFromCompletion(short)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

Completion alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::completionFromException short  depth  )  [inline]
 

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::completionFromException(short)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

Completion alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::completionOnStack short  depth  )  [inline]
 

Forwards to completionFromException(short) because in Java we can't create objects on the stack, so there is no distinction to be made.

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::completionOnStack(short)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::corbaSystemException  )  throws org.omg.CORBA.SystemException [inline]
 

An intentionally bad method that throws a CORBA::BAD_PARAM system exception to show how to handle CORBA System Exceptions

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::corbaSystemException()

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::displayMessage  )  [inline]
 

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::exceptionFromCompletion short  depth  )  throws GenericErrorEx [inline]
 

This method throws a GenericErrorEx exception if the completion returned from internalCompletionMethod(int) has an associated exception. This will be the case if the depth parameter is > 0.

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::exceptionFromCompletion(short)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::internalBadMethod int  depth  )  throws AcsJGenericErrorEx [inline, private]
 

Method that calls itself recursively to construct an AcsJGenericErrorEx exception with causing exceptions of the same type.

This behavior is meant to mimic a number of calls down into the implementation classes of a real-world component, even though there we would typically deal with different methods calling one another, instead of the same method calling itself recursively.

Parameters:
depth the number of chained exceptions thrown in the end. May be zero, meaning that no exception will be thrown.
Exceptions:
AcsJGenericErrorEx,which is the JDK-style peer of GenericErrorEx.

AcsJCompletion alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::internalCompletionMethod int  depth  )  [inline, private]
 

Creates a completion, optionally based on a chain of exceptions.

Parameters:
depth The number of chained exceptions attached to the completion, which may be zero.
Returns:

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::outCompletion alma.ACSErr.CompletionHolder  comp  )  [inline]
 

this method returns a Completion as an out parameter.

See also:
alma.acsexmplErrorComponent.ErrorComponentOperations::outCompletion(alma.ACSErr.CompletionHolder)

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.

void alma::acsexmplErrorComponent::ErrorComponentImpl::ErrorComponentImpl::typeException short  depth  )  throws ACSErrTypeCommonEx [inline]
 

Implements alma::acsexmplErrorComponent::ErrorComponentOperations.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:59:56 2009 for ACS Java API by doxygen 1.3.8