类org.omg.CORBA.CompletionStatus源码实例Demo

下面列出了怎么用org.omg.CORBA.CompletionStatus的API类实例代码及写法,或者点击链接到github查看源代码。

public INTERNAL errorSetDoubleField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_DOUBLE_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetDoubleField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public INTERNAL errorSetIntField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_INT_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetIntField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码3 项目: JDKSourceCode1.8   文件: POASystemException.java
public INTERNAL poaInternalGetServantError( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( POA_INTERNAL_GET_SERVANT_ERROR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.poaInternalGetServantError",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public INTERNAL noProfilesInIor( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NO_PROFILES_IN_IOR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.noProfilesInIor",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
protected SystemException convertThrowableToSystemException(
    Throwable throwable,
    CompletionStatus completionStatus)
{
    if (throwable instanceof SystemException) {
        return (SystemException)throwable;
    }

    if (throwable instanceof RequestCanceledException) {
        // Reporting an exception response causes the
        // poa current stack, the interceptor stacks, etc.
        // to be balanced.  It also notifies interceptors
        // that the request was cancelled.

        return wrapper.requestCanceled( throwable ) ;
    }

    // NOTE: We do not trap ThreadDeath above Throwable.
    // There is no reason to stop the thread.  It is
    // just a worker thread.  The ORB never throws
    // ThreadDeath.  Client code may (e.g., in ServantManagers,
    // interceptors, or servants) but that should not
    // effect the ORB threads.  So it is just handled
    // generically.

    //
    // Last resort.
    // If user code throws a non-SystemException report it generically.
    //

    return wrapper.runtimeexception( CompletionStatus.COMPLETED_MAYBE, throwable ) ;
}
 
源代码6 项目: JDKSourceCode1.8   文件: POASystemException.java
public OBJECT_NOT_EXIST adapterDestroyed( CompletionStatus cs, Throwable t ) {
    OBJECT_NOT_EXIST exc = new OBJECT_NOT_EXIST( ADAPTER_DESTROYED, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.adapterDestroyed",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public NO_RESOURCES noConnectionPriority( CompletionStatus cs, Throwable t ) {
    NO_RESOURCES exc = new NO_RESOURCES( NO_CONNECTION_PRIORITY, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.noConnectionPriority",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public INTERNAL cantCloneTemplate( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( CANT_CLONE_TEMPLATE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.cantCloneTemplate",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码9 项目: JDKSourceCode1.8   文件: OMGSystemException.java
public BAD_PARAM xaCallInval( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( XA_CALL_INVAL, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.xaCallInval",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码10 项目: jdk8u60   文件: PIHandlerImpl.java
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
源代码11 项目: jdk1.8-source-analysis   文件: MessageBase.java
private static void AreFragmentsAllowed(byte major, byte minor, byte flag,
        byte msgType) {

    if ( (major == 0x01) && (minor == 0x00) ) { // 1.0
        if (msgType == GIOPFragment) {
            throw wrapper.fragmentationDisallowed(
                CompletionStatus.COMPLETED_MAYBE);
        }
    }

    if ( (flag & MORE_FRAGMENTS_BIT) == MORE_FRAGMENTS_BIT ) {
        switch (msgType) {
        case GIOPCancelRequest :
        case GIOPCloseConnection :
        case GIOPMessageError :
            throw wrapper.fragmentationDisallowed(
                CompletionStatus.COMPLETED_MAYBE);
        case GIOPLocateRequest :
        case GIOPLocateReply :
            if ( (major == 0x01) && (minor == 0x01) ) { // 1.1
                throw wrapper.fragmentationDisallowed(
                    CompletionStatus.COMPLETED_MAYBE);
            }
            break;
        }
    }
}
 
源代码12 项目: JDKSourceCode1.8   文件: POASystemException.java
public INITIALIZE bootstrapError( CompletionStatus cs, Throwable t ) {
    INITIALIZE exc = new INITIALIZE( BOOTSTRAP_ERROR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.bootstrapError",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码13 项目: JDKSourceCode1.8   文件: Utility.java
/**
 * Get the helper for an IDLValue
 *
 * Throws MARSHAL exception if no helper found.
 */
public static BoxedValueHelper getHelper(Class clazz, String codebase,
    String repId)
{
    String className = null;
    if (clazz != null) {
        className = clazz.getName();
        if (codebase == null)
            codebase = Util.getCodebase(clazz);
    } else {
        if (repId != null)
            className = RepositoryId.cache.getId(repId).getClassName();
        if (className == null) // no repId or unrecognized repId
            throw wrapper.unableLocateValueHelper(
                CompletionStatus.COMPLETED_MAYBE);
    }

    try {
        ClassLoader clazzLoader =
            (clazz == null ? null : clazz.getClassLoader());
        Class helperClass =
            loadClassForClass(className+"Helper", codebase, clazzLoader,
            clazz, clazzLoader);
        return (BoxedValueHelper)helperClass.newInstance();

    } catch (ClassNotFoundException cnfe) {
        throw wrapper.unableLocateValueHelper( CompletionStatus.COMPLETED_MAYBE,
            cnfe );
    } catch (IllegalAccessException iae) {
        throw wrapper.unableLocateValueHelper( CompletionStatus.COMPLETED_MAYBE,
            iae );
    } catch (InstantiationException ie) {
        throw wrapper.unableLocateValueHelper( CompletionStatus.COMPLETED_MAYBE,
            ie );
    } catch (ClassCastException cce) {
        throw wrapper.unableLocateValueHelper( CompletionStatus.COMPLETED_MAYBE,
            cce );
    }
}
 
源代码14 项目: JDKSourceCode1.8   文件: OMGSystemException.java
public BAD_INV_ORDER invalidPiCall1( CompletionStatus cs, Throwable t ) {
    BAD_INV_ORDER exc = new BAD_INV_ORDER( INVALID_PI_CALL1, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.FINE )) {
        Object[] parameters = null ;
        doLog( Level.FINE, "OMG.invalidPiCall1",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
 
public UNKNOWN unknownUserException( CompletionStatus cs, Throwable t ) {
    UNKNOWN exc = new UNKNOWN( UNKNOWN_USER_EXCEPTION, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.FINE )) {
        Object[] parameters = null ;
        doLog( Level.FINE, "OMG.unknownUserException",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码17 项目: JDKSourceCode1.8   文件: OMGSystemException.java
public TRANSIENT poaDestroyed( CompletionStatus cs, Throwable t ) {
    TRANSIENT exc = new TRANSIENT( POA_DESTROYED, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.poaDestroyed",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码18 项目: JDKSourceCode1.8   文件: POASystemException.java
public INTERNAL pmfCreateRetain( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( PMF_CREATE_RETAIN, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.pmfCreateRetain",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public INTERNAL exceptionInContexts( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( EXCEPTION_IN_CONTEXTS, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "INTERCEPTORS.exceptionInContexts",
            parameters, InterceptorsSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码20 项目: JDKSourceCode1.8   文件: POASystemException.java
public OBJ_ADAPTER noContext( CompletionStatus cs, Throwable t ) {
    OBJ_ADAPTER exc = new OBJ_ADAPTER( NO_CONTEXT, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.FINE )) {
        Object[] parameters = null ;
        doLog( Level.FINE, "POA.noContext",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public MARSHAL unsupportedFormatVersion( CompletionStatus cs, Throwable t ) {
    MARSHAL exc = new MARSHAL( UNSUPPORTED_FORMAT_VERSION, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.unsupportedFormatVersion",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public BAD_PARAM unionBadDiscriminator( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( UNION_BAD_DISCRIMINATOR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.unionBadDiscriminator",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码23 项目: JDKSourceCode1.8   文件: OMGSystemException.java
public MARSHAL rmiiiopOptionalDataIncompatible3( CompletionStatus cs, Throwable t ) {
    MARSHAL exc = new MARSHAL( RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE3, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.FINE )) {
        Object[] parameters = null ;
        doLog( Level.FINE, "OMG.rmiiiopOptionalDataIncompatible3",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码24 项目: TencentKona-8   文件: PIHandlerImpl.java
public void cleanupClientPIRequest() {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    ClientRequestInfoImpl info = peekClientRequestInfoImplStack();
    RetryType rt = info.getRetryRequest() ;

    // fix for 6763340
    if (!rt.equals( RetryType.BEFORE_RESPONSE )) {

        // If the replyStatus has not yet been set, this is an indication
        // that the ORB threw an exception before we had a chance to
        // invoke the client interceptor ending points.
        //
        // _REVISIT_ We cannot handle any exceptions or ForwardRequests
        // flagged by the ending points here because there is no way
        // to gracefully handle this in any of the calling code.
        // This is a rare corner case, so we will ignore this for now.
        short replyStatus = info.getReplyStatus();
        if (replyStatus == info.UNINITIALIZED ) {
            invokeClientPIEndingPoint( ReplyMessage.SYSTEM_EXCEPTION,
                wrapper.unknownRequestInvoke(
                    CompletionStatus.COMPLETED_MAYBE ) ) ;
        }
    }

    // Decrement entry count, and if it is zero, pop it from the stack.
    info.decrementEntryCount();

    // fix for 6763340, and probably other cases (non-recursive retry)
    if (info.getEntryCount() == 0 && !info.getRetryRequest().isRetry()) {
        // RequestInfoStack<ClientRequestInfoImpl> infoStack =
        //     threadLocalClientRequestInfoStack.get();
        RequestInfoStack infoStack =
            (RequestInfoStack)threadLocalClientRequestInfoStack.get();
        infoStack.pop();
        printPop();
    }
}
 
protected SystemException convertThrowableToSystemException(
    Throwable throwable,
    CompletionStatus completionStatus)
{
    if (throwable instanceof SystemException) {
        return (SystemException)throwable;
    }

    if (throwable instanceof RequestCanceledException) {
        // Reporting an exception response causes the
        // poa current stack, the interceptor stacks, etc.
        // to be balanced.  It also notifies interceptors
        // that the request was cancelled.

        return wrapper.requestCanceled( throwable ) ;
    }

    // NOTE: We do not trap ThreadDeath above Throwable.
    // There is no reason to stop the thread.  It is
    // just a worker thread.  The ORB never throws
    // ThreadDeath.  Client code may (e.g., in ServantManagers,
    // interceptors, or servants) but that should not
    // effect the ORB threads.  So it is just handled
    // generically.

    //
    // Last resort.
    // If user code throws a non-SystemException report it generically.
    //

    return wrapper.runtimeexception( CompletionStatus.COMPLETED_MAYBE, throwable ) ;
}
 
源代码26 项目: JDKSourceCode1.8   文件: OMGSystemException.java
public OBJ_ADAPTER badPolicyIncarnate( CompletionStatus cs, Throwable t ) {
    OBJ_ADAPTER exc = new OBJ_ADAPTER( BAD_POLICY_INCARNATE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.badPolicyIncarnate",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码27 项目: openjdk-jdk8u   文件: CDROutputStream_1_0.java
public final void write_float_array(float[]value, int offset, int length) {
    if ( value == null )
        throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE);

    // This will only have an effect if we're already chunking
    handleSpecialChunkBegin(computeAlignment(4) + (length * 4));

    for (int i = 0; i < length; i++)
        write_float(value[offset + i]);

    // This will only have an effect if we're already chunking
    handleSpecialChunkEnd();
}
 
源代码28 项目: JDKSourceCode1.8   文件: POASystemException.java
public BAD_PARAM badTransactionContext( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( BAD_TRANSACTION_CONTEXT, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.badTransactionContext",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
public BAD_OPERATION operationUnknownToTarget( CompletionStatus cs, Throwable t ) {
    BAD_OPERATION exc = new BAD_OPERATION( OPERATION_UNKNOWN_TO_TARGET, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.operationUnknownToTarget",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
源代码30 项目: TencentKona-8   文件: CDRInputStream_1_0.java
public char read_wchar() {

        // Don't allow transmission of wchar/wstring data with
        // foreign ORBs since it's against the spec.
        if (ORBUtility.isForeignORB((ORB)orb)) {
            throw wrapper.wcharDataInGiop10( CompletionStatus.COMPLETED_MAYBE);
        }

        // If we're talking to one of our legacy ORBs, do what
        // they did:
        int b1, b2;

        alignAndCheck(2, 2);

        if (littleEndian) {
            b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF;
            bbwi.position(bbwi.position() + 1);
            b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF;
            bbwi.position(bbwi.position() + 1);
        } else {
            b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF;
            bbwi.position(bbwi.position() + 1);
            b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF;
            bbwi.position(bbwi.position() + 1);
        }

        return (char)((b1 << 8) + (b2 << 0));
    }
 
 类所在包
 类方法
 同包方法