org.jacorb.orb

Class ExceptionHolderImpl

Implemented Interfaces:
Configurable, IDLEntity, java.io.Serializable, Streamable, StreamableValue, ValueBase

public class ExceptionHolderImpl
extends ExceptionHolder
implements Configurable

JacORB-specific implementation of org.omg.Messaging.ExceptionHolder. An instance of this type is used to pass an exception to a reply handler.

Version:
$Id: ExceptionHolderImpl.java,v 1.11 2004/05/06 12:40:00 nicolas Exp $

Author:
Andre Spiegel

Field Summary

Fields inherited from class org.omg.Messaging.ExceptionHolder

byte_order, is_system_exception, marshaled_exception

Constructor Summary

ExceptionHolderImpl()
No-arg constructor for demarshaling.
ExceptionHolderImpl(ReplyInputStream is)
Constructs an ExceptionHolderImpl object from an input stream.
ExceptionHolderImpl(SystemException ex)

Method Summary

void
configure(org.apache.avalon.framework.configuration.Configuration configuration)
UserException
exceptionFromHelper(String id, InputStream input)
Given a repository id, tries to find a helper for the corresponding class and uses it to unmarshal an instance of this class from the given InputStream.
byte[]
marshal()
Marshals this object into a new buffer and returns that buffer.
void
raise_exception()
void
raise_exception_with_list(ExceptionList exc_list)
String
toString()
For testing.

Methods inherited from class org.omg.Messaging.ExceptionHolder

_read, _truncatable_ids, _type, _write, raise_exception, raise_exception_with_list

Constructor Details

ExceptionHolderImpl

public ExceptionHolderImpl()
No-arg constructor for demarshaling.


ExceptionHolderImpl

public ExceptionHolderImpl(ReplyInputStream is)
Constructs an ExceptionHolderImpl object from an input stream. It is assumed that the reply status of this input stream is either USER_EXCEPTION or SYSTEM_EXCEPTION. If it has another status, a RuntimeException is thrown.


ExceptionHolderImpl

public ExceptionHolderImpl(SystemException ex)

Method Details

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
            throws org.apache.avalon.framework.configuration.ConfigurationException


exceptionFromHelper

public UserException exceptionFromHelper(String id,
                                         InputStream input)
            throws ClassNotFoundException,
                   NoSuchMethodException,
                   IllegalAccessException,
                   InvocationTargetException
Given a repository id, tries to find a helper for the corresponding class and uses it to unmarshal an instance of this class from the given InputStream.


marshal

public byte[] marshal()
Marshals this object into a new buffer and returns that buffer.


raise_exception

public void raise_exception()
            throws UserException
Overrides:
raise_exception in interface ExceptionHolder


raise_exception_with_list

public void raise_exception_with_list(ExceptionList exc_list)
            throws UserException
Overrides:
raise_exception_with_list in interface ExceptionHolder


toString

public String toString()
For testing.