public class org.apache.camel.management.mbean.ManagedService extends java.lang.Object implements org.apache.camel.api.management.ManagedInstance, org.apache.camel.api.management.mbean.ManagedServiceMBean
{
private final org.apache.camel.CamelContext context;
private final org.apache.camel.Service service;
private org.apache.camel.Route route;
public void <init>(org.apache.camel.CamelContext, org.apache.camel.Service)
{
org.apache.camel.CamelContext v;
org.apache.camel.Service v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v := @parameter: org.apache.camel.CamelContext;
v := @parameter: org.apache.camel.Service;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context> = v;
v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service> = v;
return;
}
public void init(org.apache.camel.spi.ManagementStrategy)
{
org.apache.camel.management.mbean.ManagedService v;
org.apache.camel.spi.ManagementStrategy v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v := @parameter: org.apache.camel.spi.ManagementStrategy;
return;
}
public boolean isStaticService()
{
org.apache.camel.Service v;
org.apache.camel.management.mbean.ManagedService v;
boolean v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.StaticService;
return v;
}
public org.apache.camel.Service getService()
{
org.apache.camel.Service v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
return v;
}
public org.apache.camel.CamelContext getContext()
{
org.apache.camel.CamelContext v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
return v;
}
public org.apache.camel.Route getRoute()
{
org.apache.camel.Route v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Route route>;
return v;
}
public void setRoute(org.apache.camel.Route)
{
org.apache.camel.Route v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v := @parameter: org.apache.camel.Route;
v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Route route> = v;
return;
}
public java.lang.String getState()
{
org.apache.camel.Service v, v;
java.lang.String v, v;
org.apache.camel.ServiceStatus v, v;
org.apache.camel.management.mbean.ManagedService v;
boolean v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.StatefulService;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = interfaceinvoke v.<org.apache.camel.StatefulService: org.apache.camel.ServiceStatus getStatus()>();
v = virtualinvoke v.<org.apache.camel.ServiceStatus: java.lang.String name()>();
return v;
label:
v = <org.apache.camel.ServiceStatus: org.apache.camel.ServiceStatus Started>;
v = virtualinvoke v.<org.apache.camel.ServiceStatus: java.lang.String name()>();
return v;
}
public java.lang.String getCamelId()
{
org.apache.camel.CamelContext v;
java.lang.String v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: java.lang.String getName()>();
return v;
}
public java.lang.String getCamelManagementName()
{
org.apache.camel.CamelContext v;
java.lang.String v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: java.lang.String getManagementName()>();
return v;
}
public java.lang.String getRouteId()
{
org.apache.camel.Route v, v;
java.lang.String v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Route route>;
if v == null goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Route route>;
v = interfaceinvoke v.<org.apache.camel.Route: java.lang.String getId()>();
return v;
label:
return null;
}
public java.lang.String getServiceType()
{
org.apache.camel.Service v, v;
java.lang.Class v;
java.lang.String v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
if v == null goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: java.lang.String getSimpleName()>();
return v;
label:
return null;
}
public void start() throws java.lang.Exception
{
org.apache.camel.CamelContext v;
org.apache.camel.Service v;
java.lang.IllegalArgumentException v;
org.apache.camel.ServiceStatus v;
org.apache.camel.management.mbean.ManagedService v;
boolean v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.ServiceStatus getStatus()>();
v = virtualinvoke v.<org.apache.camel.ServiceStatus: boolean isStarted()>();
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("CamelContext is not started");
throw v;
label:
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
interfaceinvoke v.<org.apache.camel.Service: void start()>();
return;
}
public void stop() throws java.lang.Exception
{
org.apache.camel.CamelContext v;
org.apache.camel.Service v;
java.lang.IllegalArgumentException v;
org.apache.camel.ServiceStatus v;
org.apache.camel.management.mbean.ManagedService v;
boolean v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.ServiceStatus getStatus()>();
v = virtualinvoke v.<org.apache.camel.ServiceStatus: boolean isStarted()>();
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("CamelContext is not started");
throw v;
label:
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
interfaceinvoke v.<org.apache.camel.Service: void stop()>();
return;
}
public boolean isSupportSuspension()
{
org.apache.camel.Service v, v;
org.apache.camel.management.mbean.ManagedService v;
boolean v, v, v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.Suspendable;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.SuspendableService;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public boolean isSuspended()
{
org.apache.camel.Service v, v;
org.apache.camel.management.mbean.ManagedService v;
boolean v, v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.SuspendableService;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = interfaceinvoke v.<org.apache.camel.SuspendableService: boolean isSuspended()>();
return v;
label:
return 0;
}
public void suspend() throws java.lang.Exception
{
java.lang.UnsupportedOperationException v;
org.apache.camel.CamelContext v;
java.lang.IllegalArgumentException v;
org.apache.camel.Service v, v, v;
org.apache.camel.ServiceStatus v;
org.apache.camel.management.mbean.ManagedService v;
boolean v, v, v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.ServiceStatus getStatus()>();
v = virtualinvoke v.<org.apache.camel.ServiceStatus: boolean isStarted()>();
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("CamelContext is not started");
throw v;
label:
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.Suspendable;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.SuspendableService;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
interfaceinvoke v.<org.apache.camel.SuspendableService: void suspend()>();
goto label;
label:
v = new java.lang.UnsupportedOperationException;
specialinvoke v.<java.lang.UnsupportedOperationException: void <init>(java.lang.String)>("suspend() is not a supported operation");
throw v;
label:
return;
}
public void resume() throws java.lang.Exception
{
java.lang.UnsupportedOperationException v;
org.apache.camel.CamelContext v;
java.lang.IllegalArgumentException v;
org.apache.camel.Service v, v;
org.apache.camel.ServiceStatus v;
org.apache.camel.management.mbean.ManagedService v;
boolean v, v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.CamelContext context>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.ServiceStatus getStatus()>();
v = virtualinvoke v.<org.apache.camel.ServiceStatus: boolean isStarted()>();
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("CamelContext is not started");
throw v;
label:
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
v = v instanceof org.apache.camel.SuspendableService;
if v == 0 goto label;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
interfaceinvoke v.<org.apache.camel.SuspendableService: void resume()>();
goto label;
label:
v = new java.lang.UnsupportedOperationException;
specialinvoke v.<java.lang.UnsupportedOperationException: void <init>(java.lang.String)>("resume() is not a supported operation");
throw v;
label:
return;
}
public java.lang.Object getInstance()
{
org.apache.camel.Service v;
org.apache.camel.management.mbean.ManagedService v;
v := @this: org.apache.camel.management.mbean.ManagedService;
v = v.<org.apache.camel.management.mbean.ManagedService: org.apache.camel.Service service>;
return v;
}
}