org.jacorb.orb
Class ExceptionHolderImpl

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

public class ExceptionHolderImpl
extends ExceptionHolder

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.9 2003/12/16 08:42:56 gerald 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 is)
          Constructs an ExceptionHolderImpl object from an input stream.
ExceptionHolderImpl(SystemException ex)
           
 
Method Summary
 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(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)

ExceptionHolderImpl

public ExceptionHolderImpl()
No-arg constructor for demarshaling.

Method Detail

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.


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.