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

项目:OpenJSharp    文件:MessageBase.java   
public static int getRequestId(Message msg) {
    switch (msg.getType()) {
    case GIOPRequest :
        return ((RequestMessage) msg).getRequestId();
    case GIOPReply :
        return ((ReplyMessage) msg).getRequestId();
    case GIOPLocateRequest :
        return ((LocateRequestMessage) msg).getRequestId();
    case GIOPLocateReply :
        return ((LocateReplyMessage) msg).getRequestId();
    case GIOPCancelRequest :
        return ((CancelRequestMessage) msg).getRequestId();
    case GIOPFragment :
        return ((FragmentMessage) msg).getRequestId();
    }

    throw wrapper.illegalGiopMsgType(
        CompletionStatus.COMPLETED_MAYBE);
}
项目:openjdk-jdk10    文件:MessageBase.java   
public static ReplyMessage createReply(
        ORB orb, GIOPVersion gv, byte encodingVersion, int request_id,
        int reply_status, ServiceContexts service_contexts, IOR ior) {

    if (gv.equals(GIOPVersion.V1_0)) { // 1.0
        return new ReplyMessage_1_0(orb, service_contexts, request_id,
                                    reply_status, ior);
    } else if (gv.equals(GIOPVersion.V1_1)) { // 1.1
        return new ReplyMessage_1_1(orb, service_contexts, request_id,
                                    reply_status, ior);
    } else if (gv.equals(GIOPVersion.V1_2)) { // 1.2
        ReplyMessage msg =
            new ReplyMessage_1_2(orb, request_id, reply_status,
                                 service_contexts, ior);
        msg.setEncodingVersion(encodingVersion);
        return msg;
    } else {
        throw wrapper.giopVersionError(
            CompletionStatus.COMPLETED_MAYBE);
    }
}
项目:OpenJSharp    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL nullReplyInGetAddrDisposition( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NULL_REPLY_IN_GET_ADDR_DISPOSITION, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.nullReplyInGetAddrDisposition",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_TYPECODE illegalParameter( CompletionStatus cs, Throwable t ) {
    BAD_TYPECODE exc = new BAD_TYPECODE( ILLEGAL_PARAMETER, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.illegalParameter",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL badCodeSetString( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( BAD_CODE_SET_STRING, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.badCodeSetString",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_INV_ORDER badOperationAfterShutdown( CompletionStatus cs, Throwable t ) {
    BAD_INV_ORDER exc = new BAD_INV_ORDER( BAD_OPERATION_AFTER_SHUTDOWN, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.badOperationAfterShutdown",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public NO_RESOURCES piOperationNotSupported8( CompletionStatus cs, Throwable t ) {
    NO_RESOURCES exc = new NO_RESOURCES( PI_OPERATION_NOT_SUPPORTED8, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.FINE )) {
        Object[] parameters = null ;
        doLog( Level.FINE, "OMG.piOperationNotSupported8",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:UtilSystemException.java   
public BAD_PARAM connectNoTie( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( CONNECT_NO_TIE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "UTIL.connectNoTie",
            parameters, UtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:openjdk-jdk10    文件:IDLJavaSerializationOutputStream.java   
public final void write_any(Any any) {
    if (any == null) {
        throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE);
    }
    write_TypeCode(any.type());
    any.write_value(parent);
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM setExceptionBadAny( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( SET_EXCEPTION_BAD_ANY, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.setExceptionBadAny",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL illegalReplyStatus( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( ILLEGAL_REPLY_STATUS, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.illegalReplyStatus",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:POASystemException.java   
public NO_IMPLEMENT methodNotImplemented( CompletionStatus cs, Throwable t ) {
    NO_IMPLEMENT exc = new NO_IMPLEMENT( METHOD_NOT_IMPLEMENTED, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.methodNotImplemented",
            parameters, POASystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:IDLJavaSerializationOutputStream.java   
public final void write_any(Any any) {
    if (any == null) {
        throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE);
    }
    write_TypeCode(any.type());
    any.write_value(parent);
}
项目:openjdk-jdk10    文件:CDRInputStream_1_0.java   
/**
 * Examines the valuetag to see how many (if any) repository IDs
 * are present on the wire.  If no repository ID information
 * is on the wire but the expectedType or expectedTypeRepId
 * is known, it will return one of those (favoring the
 * expectedType's repId). Failing that, it uses the supplied
 * BoxedValueHelper to obtain the repository ID, as a last resort.
 */
private String readRepositoryIds(int valueTag,
                                 Class expectedType,
                                 String expectedTypeRepId,
                                 BoxedValueHelper factory) {
    switch(repIdUtil.getTypeInfo(valueTag)) {
        case RepositoryIdUtility.NO_TYPE_INFO :
            // Throw an exception if we have no repository ID info and
            // no expectedType to work with.  Otherwise, how would we
            // know what to unmarshal?
            if (expectedType == null) {
                if (expectedTypeRepId != null) {
                    return expectedTypeRepId;
                } else if (factory != null) {
                    return factory.get_id();
                } else {
                    throw wrapper.expectedTypeNullAndNoRepId(
                        CompletionStatus.COMPLETED_MAYBE);
                }
            }
            return repIdStrs.createForAnyType(expectedType);
        case RepositoryIdUtility.SINGLE_REP_TYPE_INFO :
            return read_repositoryId();
        case RepositoryIdUtility.PARTIAL_LIST_TYPE_INFO :
            return read_repositoryIds();
        default:
            throw wrapper.badValueTag( CompletionStatus.COMPLETED_MAYBE,
                Integer.toHexString(valueTag) ) ;
    }
}
项目:OpenJSharp    文件:OMGSystemException.java   
public NO_IMPLEMENT incompatibleValueImpl( CompletionStatus cs, Throwable t ) {
    NO_IMPLEMENT exc = new NO_IMPLEMENT( INCOMPATIBLE_VALUE_IMPL, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.incompatibleValueImpl",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:openjdk-jdk10    文件: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();
    }
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public MARSHAL badRepIdIndirection( CompletionStatus cs, Throwable t, Object arg0) {
    MARSHAL exc = new MARSHAL( BAD_REP_ID_INDIRECTION, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[1] ;
        parameters[0] = arg0 ;
        doLog( Level.WARNING, "ORBUTIL.badRepIdIndirection",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL errorResolvingAlias( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( ERROR_RESOLVING_ALIAS, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.errorResolvingAlias",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public MARSHAL customWrapperIndirection( CompletionStatus cs, Throwable t ) {
    MARSHAL exc = new MARSHAL( CUSTOM_WRAPPER_INDIRECTION, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.customWrapperIndirection",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
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 ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_INV_ORDER badPollSync( CompletionStatus cs, Throwable t ) {
    BAD_INV_ORDER exc = new BAD_INV_ORDER( BAD_POLL_SYNC, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.badPollSync",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM ctxIllegalPropertyName( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( CTX_ILLEGAL_PROPERTY_NAME, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.ctxIllegalPropertyName",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtility.java   
public static SystemException extractSystemException(Any any) {
    InputStream in = any.create_input_stream();
    ORB orb = (ORB)(in.orb());
    if ( ! isSystemExceptionTypeCode(any.type(), orb)) {
        throw wrapper.unknownDsiSysex(CompletionStatus.COMPLETED_MAYBE);
    }
    return ORBUtility.readSystemException(in);
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM invalidObjectId( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( INVALID_OBJECT_ID, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.invalidObjectId",
            parameters, OMGSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:POASystemException.java   
public OBJ_ADAPTER localServantLookup( CompletionStatus cs, Throwable t ) {
    OBJ_ADAPTER exc = new OBJ_ADAPTER( LOCAL_SERVANT_LOOKUP, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.localServantLookup",
            parameters, POASystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL illegalGiopMsgType( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( ILLEGAL_GIOP_MSG_TYPE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ORBUTIL.illegalGiopMsgType",
            parameters, ORBUtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:UtilSystemException.java   
public BAD_PARAM connectTieWrongOrb( CompletionStatus cs, Throwable t ) {
    BAD_PARAM exc = new BAD_PARAM( CONNECT_TIE_WRONG_ORB, cs ) ;
    if (t != null)
        exc.initCause( t ) ;

    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "UTIL.connectTieWrongOrb",
            parameters, UtilSystemException.class, exc ) ;
    }

    return exc ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public BAD_PARAM bootstrapException( CompletionStatus cs ) {
    return bootstrapException( cs, null  ) ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM tcUnionBadDisc( CompletionStatus cs ) {
    return tcUnionBadDisc( cs, null  ) ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL bootstrapApplicationException( Throwable t ) {
    return bootstrapApplicationException( CompletionStatus.COMPLETED_NO, t  ) ;
}
项目:OpenJSharp    文件:IORSystemException.java   
public INTERNAL nullPoa(  ) {
    return nullPoa( CompletionStatus.COMPLETED_NO, null  ) ;
}
项目:OpenJSharp    文件:InterceptorsSystemException.java   
public INTERNAL objectHasNoDelegate(  ) {
    return objectHasNoDelegate( CompletionStatus.COMPLETED_NO, null  ) ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM soBadAddress(  ) {
    return soBadAddress( CompletionStatus.COMPLETED_NO, null  ) ;
}
项目:OpenJSharp    文件:CorbaMessageMediatorImpl.java   
protected void handleThrowableDuringServerDispatch(
    CorbaMessageMediator messageMediator,
    Throwable throwable,
    CompletionStatus completionStatus,
    int iteration)
{
    if (iteration > 10) {
        if (((ORB)messageMediator.getBroker()).subcontractDebugFlag) {
            dprint(".handleThrowableDuringServerDispatch: "
                   + opAndId(messageMediator)
                   + ": cannot handle: "
                   + throwable);
        }

        // REVISIT - should we close connection?
        RuntimeException rte =
            new RuntimeException("handleThrowableDuringServerDispatch: " +
                                 "cannot create response.");
        rte.initCause(throwable);
        throw rte;
    }

    try {
        if (throwable instanceof ForwardException) {
            ForwardException fex = (ForwardException)throwable ;
            createLocationForward( messageMediator, fex.getIOR(), null ) ;
            return;
        }

        if (throwable instanceof AddressingDispositionException) {
            handleAddressingDisposition(
                messageMediator,
                (AddressingDispositionException)throwable);
            return;
        }

        // Else.

        SystemException sex =
            convertThrowableToSystemException(throwable, completionStatus);

        createSystemExceptionResponse(messageMediator, sex, null);
        return;

    } catch (Throwable throwable2) {

        // User code (e.g., postinvoke, interceptors) may change
        // the exception, so we end up back here.
        // Report the changed exception.

        handleThrowableDuringServerDispatch(messageMediator,
                                            throwable2,
                                            completionStatus,
                                            iteration + 1);
        return;
    }
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL workerThreadSetNameFailure(  Object arg0, Object arg1, Object arg2) {
    return workerThreadSetNameFailure( CompletionStatus.COMPLETED_NO, null, arg0, arg1, arg2 ) ;
}
项目:OpenJSharp    文件:LocateReplyMessage_1_2.java   
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
项目:OpenJSharp    文件:POASystemException.java   
public INTERNAL badLocalreplystatus(  ) {
    return badLocalreplystatus( CompletionStatus.COMPLETED_NO, null  ) ;
}
项目:OpenJSharp    文件:ORBUtilSystemException.java   
public INTERNAL wcharArrayUnsupportedEncoding( CompletionStatus cs ) {
    return wcharArrayUnsupportedEncoding( cs, null  ) ;
}
项目:OpenJSharp    文件:OMGSystemException.java   
public BAD_PARAM ctxIllegalSearchString( CompletionStatus cs ) {
    return ctxIllegalSearchString( cs, null  ) ;
}