Search in sources :

Example 1 with ConnectorServerManager

use of com.sun.messaging.jmq.jmsserver.management.agent.ConnectorServerManager in project openmq by eclipse-ee4j.

the class GetJMXConnectorsHandler method handle.

/**
 * Handle the incomming administration message.
 *
 * @param con The Connection the message came in on.
 * @param cmd_msg The administration message
 * @param cmd_props The properties from the administration message
 */
@Override
public boolean handle(IMQConnection con, Packet cmd_msg, Hashtable cmd_props) {
    if (DEBUG) {
        logger.log(Logger.DEBUG, this.getClass().getName() + ": " + "GetJMXConnectorsHandler: " + cmd_props);
    }
    Agent agent = Globals.getAgent();
    ConnectorServerManager csm;
    Vector v = null;
    int status = Status.OK;
    if (agent != null) {
        csm = agent.getConnectorServerManager();
        if (csm != null) {
            v = csm.getConnectorInfo();
        }
    }
    // Send reply
    Packet reply = new Packet(con.useDirectBuffers());
    reply.setPacketType(PacketType.OBJECT_MESSAGE);
    setProperties(reply, MessageType.GET_JMX_REPLY, status, null);
    setBodyObject(reply, v);
    parent.sendReply(con, cmd_msg, reply);
    return true;
}
Also used : Agent(com.sun.messaging.jmq.jmsserver.management.agent.Agent) ConnectorServerManager(com.sun.messaging.jmq.jmsserver.management.agent.ConnectorServerManager) Vector(java.util.Vector)

Aggregations

Agent (com.sun.messaging.jmq.jmsserver.management.agent.Agent)1 ConnectorServerManager (com.sun.messaging.jmq.jmsserver.management.agent.ConnectorServerManager)1 Vector (java.util.Vector)1