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
FieldsModifier and TypeFieldDescriptionstatic final StringUse this event property key to discover event type.static final StringUse this key value to test the event type.static final StringA String representing theObjectNamethat this MBean maps to.static final StringException key for the operation result map.static final StringException message key for the operation result map.static final StringTopic space to which events are published.static final StringStatus value for a fully stopped cluster (no members are started).static final StringStatus value for a partially started cluster (some members are started).static final StringStatus value for a fully started cluster (all members are started). -
Method Summary
Modifier and TypeMethodDescriptionvoiddumpPOSTResponse(String fileName, String correlator) Dumps the JSON that is sent to a client's POST request by the Dynamic Routing service.generatePluginConfig(String pluginRoot, String webserverName) Generate a plugin-cfg.xml with the Intelligent Management stanza.generatePluginConfigContent(String pluginRoot, String webserverName) Generate a plugin-cfg.xml content with the Intelligent Management stanzagenWebServerKeystore(String keystorePassword, Map<String, Object> certProps) Returns a keystore with the keys and certificates needed for a web server to communicate with the collective.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".Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification>getTraceSpecifications(String webserver) Returns a collection of the trace specifications that apply to the specified webserver.Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification>Returns a collection of all the configured trace specifications.
-
Field Details
-
OBJECT_NAME
A String representing theObjectNamethat this MBean maps to.- See Also:
-
OPERATION_EXCEPTION
Exception key for the operation result map.The Exception object thrown by the operation.
- See Also:
-
OPERATION_EXCEPTION_MESSAGE
Exception message key for the operation result map.The value of the Exception message thrown by the operation.
- See Also:
-
STATUS_STARTED
Status value for a fully started cluster (all members are started).Returned by the getStatus() method.
- See Also:
-
STATUS_PARTIALLY_STARTED
Status value for a partially started cluster (some members are started).Returned by the getStatus() method.
- See Also:
-
STATUS_NOT_STARTED
Status value for a fully stopped cluster (no members are started).Returned by the getStatus() method.
- See Also:
-
PUBLISH_TOPIC
Topic space to which events are published.- See Also:
-
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:
-
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:
-
-
Method Details
-
generatePluginConfig
Collection<String> generatePluginConfig(String pluginRoot, String webserverName) throws InstanceNotFoundException, ReflectionException, MBeanException, IOException, SAXException, 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.
nullis not returned. - Throws:
InstanceNotFoundExceptionReflectionExceptionMBeanExceptionIOExceptionSAXExceptionTransformerException
-
generatePluginConfigContent
Document generatePluginConfigContent(String pluginRoot, String webserverName) throws InstanceNotFoundException, ReflectionException, MBeanException, IOException, SAXException, 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:
InstanceNotFoundExceptionReflectionExceptionMBeanExceptionIOExceptionSAXExceptionTransformerException
-
getConnectorClusterName
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.
nullis not returned.
-
getTraceSpecifications
Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification> getTraceSpecifications(String webserver) Returns a collection of the trace specifications that apply to the specified webserver.- Returns:
- Collection of trace specifications.
nullis not returned.
-
retrieveAllTraceSpecifications
Collection<com.ibm.ws.dynamic.routing.model.PluginTraceSpecification> retrieveAllTraceSpecifications()Returns a collection of all the configured trace specifications.- Returns:
- Collection of trace specifications.
nullis not returned.
-
dumpPOSTResponse
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 isnullcorrelator- string that is output before data is dumped to the file. can benull.
-
genWebServerKeystore
Map<String,byte[]> genWebServerKeystore(String keystorePassword, Map<String, Object> certProps) throws IOException, IllegalArgumentException, IllegalStateException, CertificateException, KeyStoreExceptionReturns 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:
IOExceptionIllegalArgumentExceptionIllegalStateExceptionCertificateExceptionKeyStoreException
-