alma::acs::exceptions::AcsJCompletion Class Reference
Inheritance diagram for alma::acs::exceptions::AcsJCompletion:
[legend]Collaboration diagram for alma::acs::exceptions::AcsJCompletion:
[legend]List of all members.
Detailed Description
Java class that facilitates working with the interoperable Completion that's generated from CORBA IDL.
A Completion
transmits the result of a remote method invocation to the client. It contains an error type and code as defined in the ACS framework, as well as an optional ErrorTrace
. Note that for asynchronous calls, it is not possible to transmit thrown exceptions to the client directly; here the Completion
fills the gap.
Similar to AcsJException
, AcsJCompletion
converts CORBA struct
data into its nicer Java representation upon construction. When an AcsJCompletion
must be transported further on over CORBA, the method toCorbaCompletion will create a corresponding Completion
with correct ErrorTrace
structs attached.
For any combination of error type/code, the ACS framework generates subclasses of AcsJCompletion
, which ensure usage of the correct type and code. To create a completion object from scratch, use the appropriate subclass; to convert an existing CORBA Completion
to an AcsJCompletion
, use the static method fromCorbaCompletion.
- Author:
- hsommer created Jan 20, 2004 3:11:34 PM
Constructor & Destructor Documentation
alma::acs::exceptions::AcsJCompletion::AcsJCompletion |
( |
|
) |
[inline, protected] |
|
alma::acs::exceptions::AcsJCompletion::AcsJCompletion |
( |
int |
type, |
|
|
int |
code |
|
) |
[inline, protected] |
|
|
To be called from ctors of generated subclasses that can't have exceptions attached. - Parameters:
-
|
alma::acs::exceptions::AcsJCompletion::AcsJCompletion |
( |
AcsJException |
acsJEx |
) |
[inline, protected] |
|
|
To be called from ctors of generated subclasses that have exceptions attached.
- Parameters:
-
|
Member Function Documentation
AcsJCompletion alma::acs::exceptions::AcsJCompletion::fromCorbaCompletion |
( |
Completion |
corbaCompletion |
) |
[inline, static] |
|
|
Factory method to create an AcsJCompletion from an existing CORBA completion. Note that the new AcsJCompletion is a direct translation, not a wrapper.
If corbaCompletion has error information attached, this will be converted, and type/code of the top-exception will have precedence over type/code stored redundantly in corbaCompletion .
To be used on the client side of a remote call. - Parameters:
-
|
AcsJException alma::acs::exceptions::AcsJCompletion::getAcsJException |
( |
|
) |
[inline] |
|
|
- Returns:
- an exception (chain) corresponding to the
ErrorTrace , or null if the completion does not correspond to an exception.
- See also:
- isError
|
int alma::acs::exceptions::AcsJCompletion::getCode |
( |
|
) |
[inline] |
|
|
Returns the completion code. |
String alma::acs::exceptions::AcsJCompletion::getProperty |
( |
String |
key |
) |
[inline] |
|
long alma::acs::exceptions::AcsJCompletion::getTimeStamp |
( |
|
) |
[inline] |
|
int alma::acs::exceptions::AcsJCompletion::getType |
( |
|
) |
[inline] |
|
|
Returns the completion type. |
void alma::acs::exceptions::AcsJCompletion::init |
( |
AcsJException |
acsJEx |
) |
[inline, protected] |
|
|
Initializes this AcsJCompletion object with the data of an AcsJException (chain).
Type, code, and timestamp are taken from acsJEx .
- Parameters:
-
- Exceptions:
-
| NullPointerException | if acsJEx is null . |
|
void alma::acs::exceptions::AcsJCompletion::init |
( |
int |
type, |
|
|
int |
code |
|
) |
[inline, protected] |
|
boolean alma::acs::exceptions::AcsJCompletion::isError |
( |
|
) |
[inline] |
|
|
True if this completion represents an error condition. The error information can be obtained from getAcsJException. |
Object alma::acs::exceptions::AcsJCompletion::setProperty |
( |
String |
key, |
|
|
String |
value |
|
) |
[inline] |
|
|
Allows extra information to be attached to the completion, but only if this completion represents an error. - Returns:
- the previous value of the specified key in this property list, or
null if it did not have one.
- Exceptions:
-
| IllegalStateException | if this completion has no exceptions attached (i.e. it is an "ok-completion"). TODO: modify ACS error system to allow properties also for ok-completions. |
|
Completion alma::acs::exceptions::AcsJCompletion::toCorbaCompletion |
( |
|
) |
[inline] |
|
|
Creates a CORBA style completion object from this Java style completion. If present, the attached exceptions are converted to ErrorTrace s.
This method should be used when a Java implementation (of a component etc) has to send an AcsJCompletion over Corba. - See also:
- fromCorbaCompletion
|
Member Data Documentation
|
optional exception; if present, type and code of completion and exception must be the same |
The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:53 2009 for ACS Java API by
1.3.8