// **********************************************************************
//
// Copyright (c) 2002
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef OB_UNKNOWN_EXCEPTION_IDL
#define OB_UNKNOWN_EXCEPTION_IDL

#include <OB/OCI.idl>

#pragma prefix "ooc.com"

module OB
{

/**
 *
 * Information about the context in which the unknown exception occurred.
 *
 **/
local interface UnknownExceptionInfo
{
    /**
     *
     * The name of the operation that the servant was executing.
     *
     * @return The operation name.
     *
     **/
    string operation();

    /**
     *
     * Indicates whether the client is expecting a response to
     * this invocation.
     *
     * @return TRUE if the client expects a response, FALSE otherwise.
     *
     **/
    boolean response_expected();

    /**
     *
     * Obtains information about the transport on which this request
     * was received.
     *
     * @return The transport information, or NULL if the request
     * was made on a collocated servant.
     *
     **/
    OCI::TransportInfo transport_info();

    /**
     *
     * Obtains a description of the exception. For example, in
     * Java this returns the exception stack trace. Calling
     * this operation in C++ will raise CORBA::NO_IMPLEMENT.
     *
     * @return The exception description.
     *
     **/
    string describe_exception();

    /**
     *
     * Raises the unknown exception.
     *
     **/
    void raise_exception();
};

/**
 *
 * The unknown exception strategy interface.
 *
 **/
local interface UnknownExceptionStrategy
{
    /**
     *
     * Handle an unknown exception.
     *
     * @param info Information about the exception.
     *
     **/
    void unknown_exception(in UnknownExceptionInfo info);

    /**
     *
     * Clean up resources prior to ORB destruction.
     *
     **/
    void destroy();
};

}; // End module OB

#endif
