本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}