...
QMan
...
MBean
...
Table of Contents |
---|
...
|
...
|
...
|
...
|
Description
QMan is exposed as MBean itself. That means its public interface will be available to any connected management client.
Object Name
Q-MAN:Name=QMan,Type=Service
Attributes
N.A.
Operations
void addBroker
Operation Name | Description | Return Type |
---|---|---|
addBroker | Connects QMan with a broker using the given connection data. | void |
Argument Name | Description | Type | Nullable | Note |
---|---|---|---|---|
host | The IP address or DNS name where Qpid Broker is running. | java.lang.String | No | N.A. |
port | The port number where Qpid broker is running. | int | No | N.A. |
username | The username used for estabilishing connection with Qpid broker | java.lang.String | No | N.A. |
password | The password used for estabilishing connection with Qpid broker | java.lang.String | No | N.A. |
virtualHost | The virtual host name | java.lang.String | No | N.A. |
initialPoolCapacity | The number of physical connections (between 0 and a positive 32-bit integer) to create when creating the (broker) connection pool. | int | No | N.A. |
maxPoolCapacity | The maximum number of physical database connections (between 0 and a positive 32-bit integer) that the (Qpid) connection pool can maintain. | int | No | N.A. |
maxWaitTimeout | The maximum amount of time to wait for an idle connection | long | No | A value of -1 means "Wait forever" |
Code Block | ||
---|---|---|
| ||
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
public class Example
{
public static void main(String[] args) throws Exception
{
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
// ObjectName objectName = new ObjectName("Q-MAN:Name=QMan,Type=Service");
ObjectName objectName = Names.QMAN_OBJECT_NAME;
String host = "qpid.host.com";
int port = 2005;
String username ="qpid_username";
String password ="qpid_password";
String virtualHost = "qpid_virtualhost";
int initialPoolCapacity = 3; // Open 3 connections immediately.
int maxPoolCapacity = 4; // another on-demand additional connection.
int maxWaitTimeout = 2000;
server.invoke(
objectName,
"addBroker",
new Object []{
host,
port,
username,
password,
virtualHost,
initialPoolCapacity,
maxPoolCapacity,
maxWaitTimeout},
new String[] {
String.class.getName(),
int.class.getName(),
String.class.getName(),
String.class.getName(),
String.class.getName(),
int.class.getName(),
int.class.getName(),
long.class.getName()
});
}
}
|
Notifications
Type | Class | Description |
---|---|---|
org.apache.qpid.management.lifecycle.entity.schema.requested |
...
org.apache.qpid.management.jmx.EntityLifecycleNotification |
...
A |
...
schema |
...
request |
...
for |
...
a |
...
QMan |
...
entity |
...
has |
...
been |
...
sent. |
...
org.apache.qpid.management.lifecycle.entity.schema.injected |
...
org.apache.qpid.management.jmx.EntityLifecycleNotification |
...
A |
...
schema |
...
has |
...
been |
...
injected |
...
on |
...
a |
...
QMan |
...
entity. |
...
org.apache.qpid.management.lifecycle.error.schema |
...
org.apache.qpid.management.jmx.EntityLifecycleNotification |
...
Qman |
...
has |
...
received |
...
a |
...
malformed |
...
schema. |
...
qman.lifecycle.entity.instance.created |
...
org.apache.qpid.management.jmx.EntityLifecycleNotification |
...
A |
...
new |
...
instance |
...
(event |
...
or |
...
object) |
...
has |
...
been |
...
created |
...
on |
...
QMan |
...
management |
...
domain. |
...
qman.lifecycle.entity.instance.removed |
...
org.apache.qpid.management.jmx.EntityLifecycleNotification |
...
An |
...
object |
...
instance |
...
has |
...
been |
...
removed |
...
from |
...
QMan |
...
management domain. |
Note |
---|
Consider that notifications are sent asynchronously so QMan is not waiting for completion of receiver task. domain. | {dynamictasklist:To be done} |