当前位置: 首页>>代码示例>>Java>>正文


Java RetryType类代码示例

本文整理汇总了Java中com.sun.corba.se.spi.protocol.RetryType的典型用法代码示例。如果您正苦于以下问题:Java RetryType类的具体用法?Java RetryType怎么用?Java RetryType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RetryType类属于com.sun.corba.se.spi.protocol包,在下文中一共展示了RetryType类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: cleanupClientPIRequest

import com.sun.corba.se.spi.protocol.RetryType; //导入依赖的package包/类
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();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:PIHandlerImpl.java

示例2: reset

import com.sun.corba.se.spi.protocol.RetryType; //导入依赖的package包/类
/**
 * Reset the info object so that it can be reused for a retry,
 * for example.
 */
void reset() {
    super.reset();

    // Please keep these in the same order that they're declared above.

    // 6763340
    retryRequest = RetryType.NONE;

    // Do not reset entryCount because we need to know when to pop this
    // from the stack.

    request = null;
    diiInitiate = false;
    messageMediator = null;

    // Clear cached attributes:
    cachedTargetObject = null;
    cachedEffectiveTargetObject = null;
    cachedArguments = null;
    cachedExceptions = null;
    cachedContexts = null;
    cachedOperationContext = null;
    cachedReceivedExceptionId = null;
    cachedResult = null;
    cachedReceivedException = null;
    cachedEffectiveProfile = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;
    cachedEffectiveComponents = null;

    piCurrentPushed = false;

    startingPointCall = CALL_SEND_REQUEST;
    endingPointCall = CALL_RECEIVE_REPLY;

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:ClientRequestInfoImpl.java

示例3: initiateClientPIRequest

import com.sun.corba.se.spi.protocol.RetryType; //导入依赖的package包/类
public void initiateClientPIRequest( boolean diiRequest ) {
    if( !hasClientInterceptors ) return;
    if( !isClientPIEnabledForThisThread() ) return;

    // Get the most recent info object from the thread local
    // ClientRequestInfoImpl stack:
    RequestInfoStack infoStack =
        (RequestInfoStack)threadLocalClientRequestInfoStack.get();
    ClientRequestInfoImpl info = null;

    if (!infoStack.empty() ) {
        info = (ClientRequestInfoImpl)infoStack.peek();
    }

    if (!diiRequest && (info != null) && info.isDIIInitiate() ) {
        // In RequestImpl.doInvocation we already called
        // initiateClientPIRequest( true ), so ignore this initiate.
        info.setDIIInitiate( false );
    } else {
        // If there is no info object or if we are not retrying a request,
        // push a new ClientRequestInfoImpl on the stack:

        // 6763340: don't push unless this is not a retry
        if( (info == null) || !info.getRetryRequest().isRetry() ) {
            info = new ClientRequestInfoImpl( orb );
            infoStack.push( info );
            printPush();
            // Note: the entry count is automatically initialized to 0.
        }

        // Reset the retry request flag so that recursive calls will
        // push a new info object, and bump up entry count so we know
        // when to pop this info object:
        info.setRetryRequest( RetryType.NONE );
        info.incrementEntryCount();

        // KMC 6763340: I don't know why this wasn't set earlier,
        // but we do not want a retry to pick up the previous
        // reply status, so clear it here.  Most likely a new
        // info was pushed before, so that this was not a problem.
        info.setReplyStatus( RequestInfoImpl.UNINITIALIZED ) ;

        // If this is a DII request, make sure we ignore the next initiate.
        if( diiRequest ) {
            info.setDIIInitiate( true );
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:49,代码来源:PIHandlerImpl.java

示例4: setRetryRequest

import com.sun.corba.se.spi.protocol.RetryType; //导入依赖的package包/类
/**
 * Set or reset the retry request flag.
 */
void setRetryRequest( RetryType retryRequest ) {
    this.retryRequest = retryRequest;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:ClientRequestInfoImpl.java

示例5: getRetryRequest

import com.sun.corba.se.spi.protocol.RetryType; //导入依赖的package包/类
/**
 * Retrieve the current retry request status.
 */
RetryType getRetryRequest() {
    // 6763340
    return this.retryRequest;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ClientRequestInfoImpl.java


注:本文中的com.sun.corba.se.spi.protocol.RetryType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。