org.jacorb.orb
Class ExceptionHolderImpl

java.lang.Object
  extended by org.omg.Messaging.ExceptionHolder
      extended by org.jacorb.orb.ExceptionHolderImpl
All Implemented Interfaces:
java.io.Serializable, org.jacorb.config.Configurable, IDLEntity, Streamable, StreamableValue, ValueBase

public class ExceptionHolderImpl
extends ExceptionHolder
implements org.jacorb.config.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.19 2009-05-03 21:35:54 andre.spiegel Exp $
Author:
Andre Spiegel
See Also:
Serialized Form

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 inputStream)
          Constructs an ExceptionHolderImpl object from an input stream.
ExceptionHolderImpl(SystemException exception)
           
 
Method Summary
 void configure(org.jacorb.config.Configuration configuration)
           
 UserException exceptionFromHelper(java.lang.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_with_list(ExceptionList exc_list)
           
 void raise_exception()
           
 java.lang.String toString()
          For testing.
 
Methods inherited from class org.omg.Messaging.ExceptionHolder
_read, _truncatable_ids, _type, _write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionHolderImpl

public ExceptionHolderImpl()
No-arg constructor for demarshaling.


ExceptionHolderImpl

public ExceptionHolderImpl(ReplyInputStream inputStream)
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 exception)
Method Detail

configure

public void configure(org.jacorb.config.Configuration configuration)
               throws org.jacorb.config.ConfigurationException
Specified by:
configure in interface org.jacorb.config.Configurable
Throws:
org.jacorb.config.ConfigurationException

raise_exception

public void raise_exception()
                     throws UserException
Specified by:
raise_exception in class ExceptionHolder
Throws:
UserException

raise_exception_with_list

public void raise_exception_with_list(ExceptionList exc_list)
                               throws UserException
Specified by:
raise_exception_with_list in class ExceptionHolder
Throws:
UserException

toString

public java.lang.String toString()
For testing.

Overrides:
toString in class java.lang.Object

exceptionFromHelper

public UserException exceptionFromHelper(java.lang.String id,
                                         InputStream input)
                                  throws java.lang.ClassNotFoundException,
                                         java.lang.NoSuchMethodException,
                                         java.lang.IllegalAccessException,
                                         java.lang.reflect.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.

Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

marshal

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