Java Code Examples for org.omg.CORBA.TCKind#tk_except()

The following examples show how to use org.omg.CORBA.TCKind#tk_except() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServerRequestImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 2
Source File: ServerRequestImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 3
Source File: ServerRequestImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 4
Source File: ServerRequestImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 5
Source File: ServerRequestImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 6
Source File: ServerRequestImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 7
Source File: ServerRequestImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 8
Source File: ServerRequestImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 9
Source File: ServerRequestImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}
 
Example 10
Source File: ServerRequestImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void set_exception(Any exc)
{
    // except can be called by the DIR at any time (CORBA 2.2 section 6.3).

    if ( exc == null )
        throw _wrapper.setExceptionCalledNullArgs() ;

    // Ensure that the Any contains a SystemException or a
    // UserException. If the UserException is not a declared exception,
    // the client will get an UNKNOWN exception.
    TCKind kind = exc.type().kind();
    if ( kind != TCKind.tk_except )
        throw _wrapper.setExceptionCalledBadType() ;

    _exception = exc;

    // Inform Portable interceptors of the exception that was set
    // so sending_exception can return the right value.
    _orb.getPIHandler().setServerPIExceptionInfo( _exception );

    // The user can only call arguments once and not at all after
    // set_exception.  (internal flags ensure this).  However, the user
    // can call set_exception multiple times.  Therefore, we only
    // invoke receive_request the first time set_exception is
    // called (if they haven't already called arguments).
    if( !_exceptionSet && !_paramsCalled ) {
        // We need to invoke intermediate points here.
        _orb.getPIHandler().invokeServerPIIntermediatePoint();
    }

    _exceptionSet = true;

    // actual marshaling of the reply msg header and exception takes place
    // after the DSI returns control to the ORB.
}