/** * Create a new ServiceControllerContext. * * @param serviceController the service controller * @param name the name of the context * @param includeLifecycle whether to include the lifecycle callouts * @param target the target */ public ServiceControllerContext(ServiceController serviceController, ObjectName name, boolean includeLifecycle, Object target) { super(name.getCanonicalName(), ServiceControllerContextActions.getLifecycleOnly()); this.objectName = name; serviceContext.objectName = objectName; this.serviceController = serviceController; setMode(ControllerMode.MANUAL); this.includeLifecycle = includeLifecycle; if (target != null) setTarget(target); }
/** * Create a new ServiceControllerContext. * * @param serviceController the service controller * @param name the name of the context * @param includeLifecycle whether to include the lifecycle callouts * @param target the target */ public ServiceControllerContext(ServiceController serviceController, ObjectName name, boolean includeLifecycle, Object target) { super(name.getCanonicalName(), ServiceControllerContextActions.getLifecycleOnly()); this.objectName = name; serviceContext.objectName = objectName; this.serviceController = serviceController; setMode(ControllerMode.MANUAL); this.includeLifecycle = includeLifecycle; if (target != null) setTarget(target); }