public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory factory, TaskRunnerFactory stopFactory, ManagementContext context, ObjectName connectorName) throws IOException { super(connector, transport, broker, factory, stopFactory); this.managementContext = context; this.connectorName = connectorName; this.mbean = new ConnectionView(this, managementContext); this.populateUserName = broker.getBrokerService().isPopulateUserNameInMBeans(); if (managementContext.isAllowRemoteAddressInMBeanNames()) { byAddressName = createObjectName("remoteAddress", transport.getRemoteAddress()); registerMBean(byAddressName); } }
@Override public ObjectName[] getConsumers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createConsumerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public ObjectName[] getProducers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createProducerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public Response processAddConnection(ConnectionInfo info) throws Exception { Response answer = super.processAddConnection(info); String clientId = info.getClientId(); if (populateUserName) { ((ConnectionView) mbean).setUserName(info.getUserName()); } if (clientId != null) { if (byClientIdName == null) { byClientIdName = createObjectName("clientId", clientId); registerMBean(byClientIdName); } } return answer; }
@Override public Response processAddConnection(ConnectionInfo info) throws Exception { Response answer = super.processAddConnection(info); String clientId = info.getClientId(); if (populateUserName) { ((ConnectionView) mbean).setUserName(info.getUserName()); } if (clientId != null) { if (byClientIdName == null) { byClientIdName = createObjectName("clientId", clientId); registerMBean(byClientIdName); } } return answer; }
public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory factory, ManagementContext context, ObjectName connectorName) throws IOException { super(connector, transport, broker, factory); this.managementContext = context; this.connectorName = connectorName; this.mbean = new ConnectionView(this); byAddressName = createByAddressObjectName("address", transport.getRemoteAddress()); registerMBean(byAddressName); }
@Override public ObjectName[] getConsumers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createConsumerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public ObjectName[] getProducers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createProducerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public Response processAddConnection(ConnectionInfo info) throws Exception { Response answer = super.processAddConnection(info); String clientId = info.getClientId(); if (populateUserName) { ((ConnectionView) mbean).setUserName(info.getUserName()); } if (clientId != null) { if (byClientIdName == null) { byClientIdName = createObjectName("clientId", clientId); registerMBean(byClientIdName); } } return answer; }
public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory factory, TaskRunnerFactory stopFactory, ManagementContext context, ObjectName connectorName) throws IOException { super(connector, transport, broker, factory, stopFactory); this.managementContext = context; this.connectorName = connectorName; this.mbean = new ConnectionView(this, managementContext); this.populateUserName = broker.getBrokerService().isPopulateUserNameInMBeans(); if (managementContext.isAllowRemoteAddressInMBeanNames()) { byAddressName = createObjectName("remoteAddress", transport.getRemoteAddress()); registerMBean(byAddressName); } }
@Override public ObjectName[] getConsumers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createConsumerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public ObjectName[] getProducers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createProducerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public Response processAddConnection(ConnectionInfo info) throws Exception { Response answer = super.processAddConnection(info); String clientId = info.getClientId(); if (populateUserName) { ((ConnectionView) mbean).setUserName(info.getUserName()); } if (clientId != null) { if (byClientIdName == null) { byClientIdName = createObjectName("clientId", clientId); registerMBean(byClientIdName); } } return answer; }
public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory factory, TaskRunnerFactory stopFactory, ManagementContext context, ObjectName connectorName) throws IOException { super(connector, transport, broker, factory, stopFactory); this.managementContext = context; this.connectorName = connectorName; this.mbean = new ConnectionView(this, managementContext); this.populateUserName = broker.getBrokerService().isPopulateUserNameInMBeans(); if (managementContext.isAllowRemoteAddressInMBeanNames()) { byAddressName = createObjectName("remoteAddress", transport.getRemoteAddress()); registerMBean(byAddressName); } }
@Override public ObjectName[] getConsumers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createConsumerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
@Override public ObjectName[] getProducers() { ObjectName[] result = null; if (connection != null && managementContext != null) { try { ObjectName query = createProducerQueury(connection.getConnectionId()); Set<ObjectName> names = managementContext.queryNames(query, null); result = names.toArray(new ObjectName[0]); } catch (Exception e) { } } return result; }
public ManagedTransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory factory, TaskRunnerFactory stopFactory, ManagementContext context, ObjectName connectorName) throws IOException { super(connector, transport, broker, factory, stopFactory); this.managementContext = context; this.connectorName = connectorName; this.mbean = new ConnectionView(this, managementContext); this.populateUserName = broker.getBrokerService().isPopulateUserNameInMBeans(); if (managementContext.isAllowRemoteAddressInMBeanNames()) { byAddressName = createObjectName("remoteAddress", transport.getRemoteAddress()); registerMBean(byAddressName); } }