Interface DynamicRoutingMBean
-
public interface DynamicRoutingMBean
The DynamicRoutingMBean defines the management interface for the DynamicRouting-1.0 liberty feature.The Apache or IHS WebSphere plugin connects to a REST service in order to provide ODR-style capabilities. The DynamicRouting MBean provides operations to manage this REST service.
The ObjectName for this MBean is "WebSphere:feature=dynamicRouting,type=DynamicRouting,name=DynamicRouting".
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EVENT_TYPE_KEY
Use this event property key to discover event type.static java.lang.String
EVENT_TYPE_TRACESPECIFICATION_VALUE
Use this key value to test the event type.static java.lang.String
OBJECT_NAME
A String representing theObjectName
that this MBean maps to.static java.lang.String
OPERATION_EXCEPTION
Exception key for the operation result map.static java.lang.String
OPERATION_EXCEPTION_MESSAGE
Exception message key for the operation result map.static java.lang.String
PUBLISH_TOPIC
Topic space to which events are published.static java.lang.String
STATUS_NOT_STARTED
Status value for a fully stopped cluster (no members are started).static java.lang.String
STATUS_PARTIALLY_STARTED
Status value for a partially started cluster (some members are started).static java.lang.String
STATUS_STARTED
Status value for a fully started cluster (all members are started).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dumpPOSTResponse(java.lang.String fileName, java.lang.String correlator)
Dumps the JSON that is sent to a client's POST request by the Dynamic Routing service.java.util.Collection<java.lang.String>
generatePluginConfig(java.lang.String pluginRoot, java.lang.String webserverName)
Generate a plugin-cfg.xml with the Intelligent Management stanza.org.w3c.dom.Document
generatePluginConfigContent(java.lang.String pluginRoot, java.lang.String webserverName)
Generate a plugin-cfg.xml content with the Intelligent Management stanzajava.util.Map<java.lang.String,byte[]>
genWebServerKeystore(java.lang.String keystorePassword, java.util.Map<java.lang.String,java.lang.Object> certProps)
Returns a keystore with the keys and certificates needed for a web server to communicate with the collective.java.lang.String
getConnectorClusterName()
Returns the name of the connector cluster this controller belongs to, either specified in server.xml, the collective name in the configuration repository, or "defaultCollective".java.util.Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification>
getTraceSpecifications(java.lang.String webserver)
Returns a collection of the trace specifications that apply to the specified webserver.java.util.Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification>
retrieveAllTraceSpecifications()
Returns a collection of all the configured trace specifications.
-
-
-
Field Detail
-
OBJECT_NAME
static final java.lang.String OBJECT_NAME
A String representing theObjectName
that this MBean maps to.- See Also:
- Constant Field Values
-
OPERATION_EXCEPTION
static final java.lang.String OPERATION_EXCEPTION
Exception key for the operation result map.The Exception object thrown by the operation.
- See Also:
- Constant Field Values
-
OPERATION_EXCEPTION_MESSAGE
static final java.lang.String OPERATION_EXCEPTION_MESSAGE
Exception message key for the operation result map.The value of the Exception message thrown by the operation.
- See Also:
- Constant Field Values
-
STATUS_STARTED
static final java.lang.String STATUS_STARTED
Status value for a fully started cluster (all members are started).Returned by the getStatus() method.
- See Also:
- Constant Field Values
-
STATUS_PARTIALLY_STARTED
static final java.lang.String STATUS_PARTIALLY_STARTED
Status value for a partially started cluster (some members are started).Returned by the getStatus() method.
- See Also:
- Constant Field Values
-
STATUS_NOT_STARTED
static final java.lang.String STATUS_NOT_STARTED
Status value for a fully stopped cluster (no members are started).Returned by the getStatus() method.
- See Also:
- Constant Field Values
-
PUBLISH_TOPIC
static final java.lang.String PUBLISH_TOPIC
Topic space to which events are published.- See Also:
- Constant Field Values
-
EVENT_TYPE_KEY
static final java.lang.String EVENT_TYPE_KEY
Use this event property key to discover event type. The event type is currently only "TRACESPECIFICATION", but more may be added in the future.- See Also:
- Constant Field Values
-
EVENT_TYPE_TRACESPECIFICATION_VALUE
static final java.lang.String EVENT_TYPE_TRACESPECIFICATION_VALUE
Use this key value to test the event type. When EVENT_TYPE_KEY=EVENT_TYPE_TRACESPECIFICATION_VALUE, this is an event that notifies the collection of trace specifications has changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
generatePluginConfig
java.util.Collection<java.lang.String> generatePluginConfig(java.lang.String pluginRoot, java.lang.String webserverName) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, javax.management.MBeanException, java.io.IOException, org.xml.sax.SAXException, javax.xml.transform.TransformerException
Generate a plugin-cfg.xml with the Intelligent Management stanza.- Parameters:
pluginRoot
- Path to plugin install root. If null or empty string, the location specified in server.xml will be used.webserverName
- Target webserver name. Multiple plugin-cfg.xml files may be generated by passing a comma-separated list of names.- Returns:
- A list of paths to generated plugin configuration files.
null
is not returned. - Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
javax.management.MBeanException
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException
-
generatePluginConfigContent
org.w3c.dom.Document generatePluginConfigContent(java.lang.String pluginRoot, java.lang.String webserverName) throws javax.management.InstanceNotFoundException, javax.management.ReflectionException, javax.management.MBeanException, java.io.IOException, org.xml.sax.SAXException, javax.xml.transform.TransformerException
Generate a plugin-cfg.xml content with the Intelligent Management stanza- Parameters:
pluginRoot
- Path to plugin install root. If null or empty string, the location specified in server.xml will be used.webserverName
- Target webserver name.- Returns:
- A document with the configuration xml
- Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException
javax.management.MBeanException
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException
-
getConnectorClusterName
java.lang.String getConnectorClusterName()
Returns the name of the connector cluster this controller belongs to, either specified in server.xml, the collective name in the configuration repository, or "defaultCollective".- Returns:
- The name of the connector cluster.
null
is not returned.
-
getTraceSpecifications
java.util.Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification> getTraceSpecifications(java.lang.String webserver)
Returns a collection of the trace specifications that apply to the specified webserver.- Returns:
- Collection of trace specifications.
null
is not returned.
-
retrieveAllTraceSpecifications
java.util.Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification> retrieveAllTraceSpecifications()
Returns a collection of all the configured trace specifications.- Returns:
- Collection of trace specifications.
null
is not returned.
-
dumpPOSTResponse
void dumpPOSTResponse(java.lang.String fileName, java.lang.String correlator)
Dumps the JSON that is sent to a client's POST request by the Dynamic Routing service. If the specified file exists, file is appended.- Parameters:
fileName
- name of the file to which JSON is dumped to. Writes to log if the file cannot be opened or if fileName isnull
correlator
- string that is output before data is dumped to the file. can benull
.
-
genWebServerKeystore
java.util.Map<java.lang.String,byte[]> genWebServerKeystore(java.lang.String keystorePassword, java.util.Map<java.lang.String,java.lang.Object> certProps) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.security.cert.CertificateException, java.security.KeyStoreException
Returns a keystore with the keys and certificates needed for a web server to communicate with the collective.- Parameters:
keystorePassword
- the password to assign to the key storecertProps
- contains nothing currently, there are no options when creating web server certificates.- Returns:
- Throws:
java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.security.cert.CertificateException
java.security.KeyStoreException
-
-