public Message putStringProperty(final SimpleString key, final SimpleString value) { properties.putSimpleStringProperty(key, value); bufferValid = false; return this; }
public void putStringProperty(final SimpleString key, final SimpleString value) { properties.putSimpleStringProperty(key, value); bufferValid = false; }
private Notification createProposalNotification(SimpleString groupId, SimpleString clusterName) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, groupId); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, clusterName); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, 0); return new Notification(null, CoreNotificationType.PROPOSAL, props); }
public void send(final Response response, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, response.getGroupId()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, response.getClusterName()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_ALT_VALUE, response.getAlternativeClusterName()); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance); Notification notification = new Notification(null, NotificationType.PROPOSAL_RESPONSE, props); managementService.sendNotification(notification); }
public void putStringProperty(final String key, final String value) { properties.putSimpleStringProperty(new SimpleString(key), SimpleString.toSimpleString(value)); bufferValid = false; }
public void sendProposalResponse(final Response response, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, response.getGroupId()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, response.getClusterName()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_ALT_VALUE, response.getAlternativeClusterName()); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance); Notification notification = new Notification(null, CoreNotificationType.PROPOSAL_RESPONSE, props); managementService.sendNotification(notification); }
public Message putStringProperty(final String key, final String value) { properties.putSimpleStringProperty(new SimpleString(key), SimpleString.toSimpleString(value)); bufferValid = false; return this; }
public Response receive(final Proposal proposal, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, proposal.getGroupId()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, proposal.getClusterName()); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance); Notification notification = new Notification(null, NotificationType.PROPOSAL, props); managementService.sendNotification(notification); return null; }
public Response receive(final Proposal proposal, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, proposal.getGroupId()); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, proposal.getClusterName()); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance); Notification notification = new Notification(null, CoreNotificationType.PROPOSAL, props); managementService.sendNotification(notification); return null; }
protected void sendUnproposal(SimpleString groupid, SimpleString clusterName, int distance) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, groupid); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_VALUE, clusterName); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, BindingType.LOCAL_QUEUE_INDEX); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, address); props.putIntProperty(ManagementHelper.HDR_DISTANCE, distance); Notification notification = new Notification(null, CoreNotificationType.UNPROPOSAL, props); try { managementService.sendNotification(notification); } catch (Exception e) { HornetQServerLogger.LOGGER.errorHandlingMessage(e); } }
public void setString(final String name, final String value) throws JMSException { checkName(name); map.putSimpleStringProperty(new SimpleString(name), value == null ? null : new SimpleString(value)); invalid = true; }
public synchronized void start() throws Exception { if (started) { return; } endpoint.openClient(); started = true; thread = new Thread(new DiscoveryRunnable(), "hornetq-discovery-group-thread-" + name); thread.setDaemon(true); thread.start(); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), new SimpleString(name)); Notification notification = new Notification(nodeID, CoreNotificationType.DISCOVERY_GROUP_STARTED, props); notificationService.sendNotification(notification); } }
public synchronized void addBinding(final Binding binding) throws Exception { addressManager.addBinding(binding); TypedProperties props = new TypedProperties(); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, binding.getType().toInt()); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, binding.getAddress()); props.putSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME, binding.getClusterName()); props.putSimpleStringProperty(ManagementHelper.HDR_ROUTING_NAME, binding.getRoutingName()); props.putLongProperty(ManagementHelper.HDR_BINDING_ID, binding.getID()); props.putIntProperty(ManagementHelper.HDR_DISTANCE, binding.getDistance()); Filter filter = binding.getFilter(); if (filter != null) { props.putSimpleStringProperty(ManagementHelper.HDR_FILTERSTRING, filter.getFilterString()); } String uid = UUIDGenerator.getInstance().generateStringUUID(); if (log.isDebugEnabled()) { log.debug("ClusterCommunication::Sending notification for addBinding " + binding + " from server " + server); } managementService.sendNotification(new Notification(uid, NotificationType.BINDING_ADDED, props)); }
public synchronized void addBinding(final Binding binding) throws Exception { addressManager.addBinding(binding); TypedProperties props = new TypedProperties(); props.putIntProperty(ManagementHelper.HDR_BINDING_TYPE, binding.getType().toInt()); props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, binding.getAddress()); props.putSimpleStringProperty(ManagementHelper.HDR_CLUSTER_NAME, binding.getClusterName()); props.putSimpleStringProperty(ManagementHelper.HDR_ROUTING_NAME, binding.getRoutingName()); props.putLongProperty(ManagementHelper.HDR_BINDING_ID, binding.getID()); props.putIntProperty(ManagementHelper.HDR_DISTANCE, binding.getDistance()); Filter filter = binding.getFilter(); if (filter != null) { props.putSimpleStringProperty(ManagementHelper.HDR_FILTERSTRING, filter.getFilterString()); } String uid = UUIDGenerator.getInstance().generateStringUUID(); if (HornetQServerLogger.LOGGER.isDebugEnabled()) { HornetQServerLogger.LOGGER.debug("ClusterCommunication::Sending notification for addBinding " + binding + " from server " + server); } managementService.sendNotification(new Notification(uid, CoreNotificationType.BINDING_ADDED, props)); }
public synchronized void start() throws Exception { if (started) { return; } InVMRegistry.instance.registerAcceptor(id, this); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("factory"), new SimpleString(InVMAcceptorFactory.class.getName())); props.putIntProperty(new SimpleString("id"), id); Notification notification = new Notification(null, NotificationType.ACCEPTOR_STARTED, props); notificationService.sendNotification(notification); } started = true; paused = false; }
public synchronized void start() throws Exception { if (started) { return; } InVMRegistry.instance.registerAcceptor(id, this); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("factory"), new SimpleString(InVMAcceptorFactory.class.getName())); props.putIntProperty(new SimpleString("id"), id); Notification notification = new Notification(null, CoreNotificationType.ACCEPTOR_STARTED, props); notificationService.sendNotification(notification); } started = true; paused = false; }
public synchronized void start() throws Exception { if (started) { return; } started = true; stopping = false; activate(); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), CoreNotificationType.BRIDGE_STARTED, props); notificationService.sendNotification(notification); } }
public synchronized void start() throws Exception { if (started) { return; } started = true; stopping = false; if (activated) { activate(); } if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), NotificationType.BRIDGE_STARTED, props); notificationService.sendNotification(notification); } }
public void pause() throws Exception { if (log.isDebugEnabled()) { log.debug("Bridge " + this.name + " being paused"); } executor.execute(new PauseRunnable()); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), NotificationType.BRIDGE_STOPPED, props); try { notificationService.sendNotification(notification); } catch (Exception e) { BridgeImpl.log.warn("unable to send notification when broadcast group is stopped", e); } } }
public synchronized void start() throws Exception { if (started) { return; } endpoint.openBroadcaster(); started = true; if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), new SimpleString(name)); Notification notification = new Notification(nodeManager.getNodeId().toString(), CoreNotificationType.BROADCAST_GROUP_STARTED, props); notificationService.sendNotification(notification); } activate(); }