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

The following examples show how to use org.omg.CORBA.TCKind#tk_except() .
Example 1
Project: jdk1.8-source-analysis   File: ServerRequestImpl.java    License: 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
Project: TencentKona-8   File: ServerRequestImpl.java    License: 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
Project: jdk8u60   File: ServerRequestImpl.java    License: 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
Project: JDKSourceCode1.8   File: ServerRequestImpl.java    License: 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
Project: openjdk-jdk8u   File: ServerRequestImpl.java    License: 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
Project: openjdk-jdk8u-backup   File: ServerRequestImpl.java    License: 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
Project: openjdk-jdk9   File: ServerRequestImpl.java    License: 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
Project: hottub   File: ServerRequestImpl.java    License: 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
Project: openjdk-8-source   File: ServerRequestImpl.java    License: 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
Project: openjdk-8   File: ServerRequestImpl.java    License: 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.
}