public interface ControlService
Different implementations of the control service provide the mechanism
to execute methods of the control interfaces. For example
JMXControlService
registers the MBeans in the JMX platform MBean server.
The control service is intended to allow remote execution of a control interface
through any mechanism. The control service provides operations and attributes
similar to JMX. It does not provide notifications.
An instance of a control service MBean is defined by its:
A remote system should be able to specify an operation on an
control server MBean though its alias and type. For example
an application might be submitted with a fixed name
PumpAnalytics (as its alias)
to allow its JobMXBean
to be determined remotely using a combination of
JobMXBean.TYPE
and PumpAnalytics.
Control service implementations may be limited in their capabilities,
for example when using the JMX control service the full capabilities
of JMX can be used, such as complex types in a control service MBean interface.
Portable applications would limit themselves to a smaller subset of
capabilities, such as only primitive types and enums.
The method Controls.isControlServiceMBean(Class)
defines
the minimal supported interface for any control service.
Modifier and Type | Method and Description |
---|---|
<T> T |
getControl(java.lang.String type,
java.lang.String alias,
java.lang.Class<T> controlInterface)
Return a control Mbean registered with this service.
|
<T> java.lang.String |
getControlId(java.lang.String type,
java.lang.String alias,
java.lang.Class<T> controlInterface)
Return the unique identifier for a control Mbean registered with
this service.
|
<T> java.lang.String |
registerControl(java.lang.String type,
java.lang.String id,
java.lang.String alias,
java.lang.Class<T> controlInterface,
T control)
Register a control MBean.
|
void |
unregister(java.lang.String controlId)
Unregister a control bean registered by
registerControl(String, String, String, Class, Object) |
<T> java.lang.String registerControl(java.lang.String type, java.lang.String id, java.lang.String alias, java.lang.Class<T> controlInterface, T control)
T
- Control MBean typetype
- Type of the control MBean.id
- Unique identifier for the control MBean.alias
- Alias for the control MBean. Required to be unique within the context
of type
.controlInterface
- Public interface for the control MBean.control
- The control MBeanvoid unregister(java.lang.String controlId)
registerControl(String, String, String, Class, Object)
controlId
- control's registration identifier returned by registerControl
<T> T getControl(java.lang.String type, java.lang.String alias, java.lang.Class<T> controlInterface)
T
- Control MBean typetype
- Type of the control MBean.alias
- Alias for the control MBean.controlInterface
- Public interface of the control MBean.<T> java.lang.String getControlId(java.lang.String type, java.lang.String alias, java.lang.Class<T> controlInterface)
T
- Control MBean typetype
- Type of the control MBean.alias
- Alias for the control MBean.controlInterface
- Public interface of the control MBean.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641