Search in sources :

Example 1 with ConnectionControl

use of org.apache.activemq.command.ConnectionControl in project activemq-artemis by apache.

the class OpenWireProtocolManager method updateClientClusterInfo.

private void updateClientClusterInfo() {
    synchronized (members) {
        members.clear();
        members.addAll(topologyMap.values());
    }
    for (OpenWireConnection c : this.connections) {
        ConnectionControl control = newConnectionControl();
        try {
            c.updateClient(control);
        } catch (Exception e) {
            ActiveMQServerLogger.LOGGER.warn(e.getMessage(), e);
            c.sendException(e);
        }
    }
}
Also used : ConnectionControl(org.apache.activemq.command.ConnectionControl) IOException(java.io.IOException) InvalidClientIDException(javax.jms.InvalidClientIDException) ActiveMQSecurityException(org.apache.activemq.artemis.api.core.ActiveMQSecurityException)

Example 2 with ConnectionControl

use of org.apache.activemq.command.ConnectionControl in project activemq-artemis by apache.

the class ConnectionControlTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ConnectionControl info = (ConnectionControl) object;
    info.setClose(true);
    info.setExit(false);
    info.setFaultTolerant(true);
    info.setResume(false);
    info.setSuspend(true);
    info.setConnectedBrokers("ConnectedBrokers:1");
    info.setReconnectTo("ReconnectTo:2");
    info.setRebalanceConnection(false);
    info.setToken("Token:3".getBytes());
}
Also used : ConnectionControl(org.apache.activemq.command.ConnectionControl)

Example 3 with ConnectionControl

use of org.apache.activemq.command.ConnectionControl in project activemq-artemis by apache.

the class ConnectionControlTest method createObject.

@Override
public Object createObject() throws Exception {
    ConnectionControl info = new ConnectionControl();
    populateObject(info);
    return info;
}
Also used : ConnectionControl(org.apache.activemq.command.ConnectionControl)

Example 4 with ConnectionControl

use of org.apache.activemq.command.ConnectionControl in project activemq-artemis by apache.

the class ConnectionControlTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ConnectionControl info = (ConnectionControl) object;
    info.setClose(true);
    info.setExit(false);
    info.setFaultTolerant(true);
    info.setResume(false);
    info.setSuspend(true);
}
Also used : ConnectionControl(org.apache.activemq.command.ConnectionControl)

Example 5 with ConnectionControl

use of org.apache.activemq.command.ConnectionControl in project activemq-artemis by apache.

the class ConnectionControlTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    ConnectionControl info = (ConnectionControl) object;
    info.setClose(true);
    info.setExit(false);
    info.setFaultTolerant(true);
    info.setResume(false);
    info.setSuspend(true);
    info.setConnectedBrokers("ConnectedBrokers:1");
    info.setReconnectTo("ReconnectTo:2");
    info.setRebalanceConnection(false);
}
Also used : ConnectionControl(org.apache.activemq.command.ConnectionControl)

Aggregations

ConnectionControl (org.apache.activemq.command.ConnectionControl)21 IOException (java.io.IOException)2 InvalidClientIDException (javax.jms.InvalidClientIDException)1 ActiveMQSecurityException (org.apache.activemq.artemis.api.core.ActiveMQSecurityException)1 SimpleString (org.apache.activemq.artemis.api.core.SimpleString)1 Connection (org.apache.activemq.broker.Connection)1 ConnectionContext (org.apache.activemq.broker.ConnectionContext)1 Connector (org.apache.activemq.broker.Connector)1 ProducerBrokerExchange (org.apache.activemq.broker.ProducerBrokerExchange)1 ActiveMQQueue (org.apache.activemq.command.ActiveMQQueue)1 ActiveMQTextMessage (org.apache.activemq.command.ActiveMQTextMessage)1 Command (org.apache.activemq.command.Command)1 Message (org.apache.activemq.command.Message)1 ProducerInfo (org.apache.activemq.command.ProducerInfo)1 Response (org.apache.activemq.command.Response)1 ProducerState (org.apache.activemq.state.ProducerState)1 MessageStore (org.apache.activemq.store.MessageStore)1 PersistenceAdapter (org.apache.activemq.store.PersistenceAdapter)1 Test (org.junit.Test)1