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


Java InstanceStatus.setRunWithTimer方法代码示例

本文整理汇总了Java中org.oscm.app.data.InstanceStatus.setRunWithTimer方法的典型用法代码示例。如果您正苦于以下问题:Java InstanceStatus.setRunWithTimer方法的具体用法?Java InstanceStatus.setRunWithTimer怎么用?Java InstanceStatus.setRunWithTimer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.oscm.app.data.InstanceStatus的用法示例。


在下文中一共展示了InstanceStatus.setRunWithTimer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testRaiseEventOneServiceInstanceDisableTimer

import org.oscm.app.data.InstanceStatus; //导入方法依赖的package包/类
@Test
public void testRaiseEventOneServiceInstanceDisableTimer()
        throws Exception {
    // given
    requestInstanceProvisioning = true;
    setControllerReady = true;
    createServiceInstance(ProvisioningStatus.WAITING_FOR_SYSTEM_CREATION,
            InstanceParameter.PUBLIC_IP);

    // Disable timer through event
    InstanceStatus rcStatus = new InstanceStatus();
    rcStatus.setRunWithTimer(false);
    when(controller.notifyInstance(matches("appInstanceId"),
            any(ProvisioningSettings.class), any(Properties.class)))
                    .thenReturn(rcStatus);

    // when
    raiseEvent(CTRL_ID, "appInstanceId", null);
    handleTimer();

    // then
    verifyZeroInteractions(provFactoryBean);
    validateServiceInstanceStatus(
            ProvisioningStatus.WAITING_FOR_SYSTEM_CREATION);
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:26,代码来源:APPTimerServiceBeanIT.java

示例2: getControllerInstanceStatus

import org.oscm.app.data.InstanceStatus; //导入方法依赖的package包/类
/**
 * Provide information about the state of operation according to current
 * task state.
 * 
 * @param controllerId
 *            id of the controller
 * @param instanceId
 *            id of the instance
 * @param paramHandler
 *            entity which holds all properties of the instance.
 * @return InstanceStatus
 * @throws Exception
 */
public InstanceStatus getControllerInstanceStatus(String controllerId,
        String instanceId, PropertyHandler paramHandler) throws Exception {
    if (paramHandler.isInstanceSuspended()) {
        return getInstanceStatusForSuspendedInstance();
    }
    FlowState oldState = paramHandler.getState();
    // Check and/or dispatch next provisioning operation
    performProvisioningProcessing(controllerId, instanceId, paramHandler);

    FlowState state = paramHandler.getState();
    if (state == FlowState.FAILED) {
        throw new APPlatformException(Messages.getAll("error_operation"));
    }
    Operation operation = paramHandler.getOperation();
    InstanceStatus result = new InstanceStatus();
    result.setIsReady((state == FlowState.FINISHED && (operation != null && !operation
            .isDeletion())) || state == FlowState.DESTROYED);
    result.setRunWithTimer(state != FlowState.MANUAL);

    if (state == FlowState.VSERVERS_STOPPING) {
        result.setAccessInfo(Messages.get(paramHandler.getCustomerLocale(),
                "accessInfo_NOT_AVAILABLE"));
    }
    if (result.isReady()) {
        if (state != FlowState.DESTROYED
                && oldState != FlowState.VSERVERS_STOPPING) {
            // add access info as far as applicable
            result.setAccessInfo(getConnectionData(instanceId, paramHandler));
        }
        // notify about modification
        sendMailAboutModification(instanceId, paramHandler);
    }
    return result;
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:48,代码来源:ProcessManagerBean.java

示例3: getInstanceStatusForSuspendedInstance

import org.oscm.app.data.InstanceStatus; //导入方法依赖的package包/类
/**
 * Returns the Instance Status which corresponds to a suspended instance.
 * 
 * @return InstanceStatus
 */
private InstanceStatus getInstanceStatusForSuspendedInstance() {
    InstanceStatus result = new InstanceStatus();
    result.setRunWithTimer(true);
    result.setIsReady(false);
    return result;
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:12,代码来源:ProcessManagerBean.java


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