@Cli(name="subscribe",
description="Subscribe to the notifications of a bean",
note="Syntax is \n subscribe <bean>")
public class SubscribeCommand
extends Command
All notifications will be printed to the output in the form of notification received: timestamp=xxx,class=xxx,source=xxx,type=xxx,message=xxx To remove the subscription call the unsubscribe in the terminal.
| Modifier and Type | Class and Description |
|---|---|
class |
SubscribeCommand.BeanNotificationListener |
| Constructor and Description |
|---|
SubscribeCommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Execute command
|
static Map<ObjectName,NotificationListener> |
getListeners() |
void |
setBean(String bean) |
void |
setDomain(String domain) |
doSuggestArgument, doSuggestOption, getSession, isHelp, setHelp, setSession, suggestArgument, suggestOptionpublic static Map<ObjectName,NotificationListener> getListeners()
public void execute()
throws MalformedObjectNameException,
IOException,
JMException
Commandexecute in class CommandIOException - IO errorsJMException - JMX errorsMalformedObjectNameException@Option(name="b",
longName="bean",
description="MBean to invoke")
public final void setBean(String bean)
bean - Bean under which the operation is@Option(name="d",
longName="domain",
description="Domain of MBean to invoke")
public final void setDomain(String domain)
domain - Domain under which is bean isCopyright © 2008–2020. All rights reserved.