Class NotificationCommandFactory
java.lang.Object
org.jolokia.server.core.request.notification.NotificationCommandFactory
This factory produces
NotificationCommand objects which specify a certain aspect
during notification listener registration. I.e. when a request type is
NOTIFICATION then there are several commands like 'register', 'add', 'list'
or 'ping' responsible for the correct listener management.- Since:
- 19.03.13
- Author:
- roland
-
Method Summary
Modifier and TypeMethodDescriptionstatic NotificationCommandcreateCommand(Map<String, ?> pCommandMap) Create a command out of a map, possible out of aJSONObject.static NotificationCommandcreateCommand(Stack<String> pStack) Create a command out of the request path.
-
Method Details
-
createCommand
public static NotificationCommand createCommand(Stack<String> pStack) throws MalformedObjectNameException Create a command out of the request path. The command type must be on top of the stack with the command specific options following. This method is suitable for parsing GET requests.- Parameters:
pStack- string stack with various path parts specifying the command detail.- Returns:
- the created command
- Throws:
MalformedObjectNameException- if an objectname part has an invalid format
-
createCommand
public static NotificationCommand createCommand(Map<String, ?> pCommandMap) throws MalformedObjectNameExceptionCreate a command out of a map, possible out of aJSONObject. The command name itself must be given under the key "command", the rest of the map holds the specifics for this command.- Parameters:
pCommandMap- parameter from which to extract the command- Returns:
- the created command
- Throws:
MalformedObjectNameException- if an objectname part has an invalid format
-