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


Java ServiceStatus.name方法代码示例

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


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

示例1: getEndpointState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
private static String getEndpointState(Endpoint endpoint) {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (endpoint instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) endpoint).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:AbstractLocalCamelController.java

示例2: getRouteState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
private static String getRouteState(Route route) {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.

    ServiceStatus status = route.getRouteContext().getCamelContext().getRouteStatus(route.getId());
    if (status != null) {
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:AbstractLocalCamelController.java

示例3: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (service instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) service).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:ManagedService.java

示例4: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
@Override
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (dataFormat instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) dataFormat).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:ManagedDataFormat.java

示例5: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
@Override
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (endpoint instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) endpoint).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:ManagedEndpoint.java

示例6: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (component instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) component).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:ManagedComponent.java

示例7: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    if (processor instanceof StatefulService) {
        ServiceStatus status = ((StatefulService) processor).getStatus();
        return status.name();
    }

    // assume started if not a ServiceSupport instance
    return ServiceStatus.Started.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:ManagedProcessor.java

示例8: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    ServiceStatus status = context.getRouteStatus(route.getId());
    // if no status exists then its stopped
    if (status == null) {
        status = ServiceStatus.Stopped;
    }
    return status.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:ManagedRoute.java

示例9: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
public String getState() {
    // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
    ServiceStatus status = null;
    if (consumer instanceof StatefulService) {
        status = ((StatefulService) consumer).getStatus();
    }
    // if no status exists then its stopped
    if (status == null) {
        status = ServiceStatus.Stopped;
    }
    return status.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:13,代码来源:DefaultRestRegistry.java

示例10: getState

import org.apache.camel.ServiceStatus; //导入方法依赖的package包/类
@ManagedAttribute(description = "Service State")
public String getState() {
    ServiceStatus status = this.getStatus();
    // if no status exists then its stopped
    if (status == null) {
        status = ServiceStatus.Stopped;
    }
    return status.name();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:TwitterEndpointDirect.java


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