/** * Creates a TransportConfiguration providing the class name of the {@link org.hornetq.spi.core.remoting.ConnectorFactory} * and any parameters needed. * * @param className The class name of the ConnectorFactory * @param params The parameters needed by the ConnectorFactory */ public TransportConfiguration(final String className, final Map<String, Object> params) { this(className, params, UUIDGenerator.getInstance().generateStringUUID()); }
public DiscoveryGroupConfiguration(final String groupAddress, final int groupPort) { this(UUIDGenerator.getInstance().generateStringUUID(), null, groupAddress, groupPort, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT); }
/** * Creates a TransportConfiguration providing the class name of the {@link org.hornetq.spi.core.remoting.ConnectorFactory} * * @param className The class name of the ConnectorFactory */ public TransportConfiguration(final String className) { this(className, new HashMap<String, Object>(), UUIDGenerator.getInstance().generateStringUUID()); }
/** * Creates a TransportConfiguration providing the class name of the {@link org.hornetq.spi.core.remoting.ConnectorFactory} * and any parameters needed. * * @param className The class name of the ConnectorFactory * @param params The parameters needed by the ConnectorFactory */ public TransportConfiguration(final String className, final Map<String, Object> params) { this(className, params, UUIDGenerator.getInstance().generateStringUUID()); }
/** * Creates a TransportConfiguration providing the class name of the {@link org.hornetq.spi.core.remoting.ConnectorFactory} * * @param className The class name of the ConnectorFactory */ public TransportConfiguration(final String className) { this(className, new HashMap<String, Object>(), UUIDGenerator.getInstance().generateStringUUID()); }
public DiscoveryGroupConfiguration(final long refreshTimeout, final long discoveryInitialWaitTimeout, BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration) { this(UUIDGenerator.getInstance().generateStringUUID(), refreshTimeout, discoveryInitialWaitTimeout, endpointFactoryConfiguration); }
public SimpleString generateSimpleStringUUID() { return new SimpleString(generateStringUUID()); }
public final SimpleString generateSimpleStringUUID() { return new SimpleString(generateStringUUID()); }
/** * Broadcast group is bound locally to the wildcard address */ public BroadcastGroupImpl(final String nodeID, final String name, final InetAddress localAddress, final int localPort, final InetAddress groupAddress, final int groupPort, final ScheduledExecutorService scheduledExecutor, final long broadcastPeriod) throws Exception { this.nodeID = nodeID; this.name = name; this.localAddress = localAddress; this.localPort = localPort; this.groupAddress = groupAddress; this.groupPort = groupPort; this.scheduledExecutor = scheduledExecutor; this.broadCastPeriod = broadcastPeriod; uniqueID = UUIDGenerator.getInstance().generateStringUUID(); }
public DivertConfiguration(final String name, final String routingName, final String address, final String forwardingAddress, final boolean exclusive, final String filterString, final String transformerClassName) { this.name = name; if (routingName == null) { this.routingName = UUIDGenerator.getInstance().generateStringUUID(); } else { this.routingName = routingName; } this.address = address; this.forwardingAddress = forwardingAddress; this.exclusive = exclusive; this.filterString = filterString; this.transformerClassName = transformerClassName; }
public DivertConfiguration(final String name, final String routingName, final String address, final String forwardingAddress, final boolean exclusive, final String filterString, final String transformerClassName) { this.name = name; if (routingName == null) { this.routingName = UUIDGenerator.getInstance().generateStringUUID(); } else { this.routingName = routingName; } this.address = address; this.forwardingAddress = forwardingAddress; this.exclusive = exclusive; this.filterString = filterString; this.transformerClassName = transformerClassName; }
public synchronized SequentialFileFactory newFileFactory(final SimpleString address) throws Exception { String guid = UUIDGenerator.getInstance().generateStringUUID(); SequentialFileFactory factory = newFileFactory(guid); factory.createDirs(); File fileWithID = new File(directory + File.separatorChar + guid + File.separatorChar + PagingStoreFactoryNIO.ADDRESS_FILE); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileWithID))); try { writer.write(address.toString()); writer.newLine(); } finally { writer.close(); } return factory; }
public synchronized SequentialFileFactory newFileFactory(final SimpleString address) throws Exception { String guid = UUIDGenerator.getInstance().generateStringUUID(); SequentialFileFactory factory = newFileFactory(guid); factory.createDirs(); File fileWithID = new File(directory + File.separatorChar + guid + File.separatorChar + PagingStoreFactoryNIO.ADDRESS_FILE); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileWithID))); try { writer.write(address.toString()); writer.newLine(); } finally { writer.close(); } return factory; }
public BroadcastGroupImpl(final NodeManager nodeManager, final String name, final long broadCastPeriod, final ScheduledExecutorService scheduledExecutor, final BroadcastEndpointFactory endpointFactory) throws Exception { this.nodeManager = nodeManager; this.name = name; this.scheduledExecutor = scheduledExecutor; this.broadCastPeriod = broadCastPeriod; this.endpoint = endpointFactory.createBroadcastEndpoint(); uniqueID = UUIDGenerator.getInstance().generateStringUUID(); }
private ServerMessage createQueueInfoMessage(final NotificationType type, final SimpleString queueName) { ServerMessage message = new ServerMessageImpl(storageManager.generateUniqueID(), 50); message.setAddress(queueName); String uid = UUIDGenerator.getInstance().generateStringUUID(); message.putStringProperty(ManagementHelper.HDR_NOTIFICATION_TYPE, new SimpleString(type.toString())); message.putLongProperty(ManagementHelper.HDR_NOTIFICATION_TIMESTAMP, System.currentTimeMillis()); message.putStringProperty(new SimpleString("foobar"), new SimpleString(uid)); return message; }
private ServerMessage createQueueInfoMessage(final NotificationType type, final SimpleString queueName) { ServerMessage message = new ServerMessageImpl(storageManager.generateUniqueID(), 50); message.setAddress(queueName); String uid = UUIDGenerator.getInstance().generateStringUUID(); message.putStringProperty(ManagementHelper.HDR_NOTIFICATION_TYPE, new SimpleString(type.toString())); message.putLongProperty(ManagementHelper.HDR_NOTIFICATION_TIMESTAMP, System.currentTimeMillis()); message.putStringProperty(new SimpleString("foobar"), new SimpleString(uid)); return message; }
private StompSession getTransactedSession(StompConnection connection, String txID) throws Exception { StompSession stompSession = transactedSessions.get(txID); if (stompSession == null) { stompSession = new StompSession(connection, this, server.getStorageManager().newContext(executor)); String name = UUIDGenerator.getInstance().generateStringUUID(); ServerSession session = server.createSession(name, connection.getLogin(), connection.getPasscode(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, connection, false, false, false, false, null, stompSession); stompSession.setServerSession(session); transactedSessions.put(txID, stompSession); } server.getStorageManager().setContext(stompSession.getContext()); return stompSession; }
private StompSession getSession(StompConnection connection) throws Exception { StompSession stompSession = sessions.get(connection.getID()); if (stompSession == null) { stompSession = new StompSession(connection, this, server.getStorageManager() .newContext(server.getExecutorFactory().getExecutor())); String name = UUIDGenerator.getInstance().generateStringUUID(); ServerSession session = server.createSession(name, connection.getLogin(), connection.getPasscode(), HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, connection, true, false, false, false, null, stompSession); stompSession.setServerSession(session); sessions.put(connection.getID(), stompSession); } server.getStorageManager().setContext(stompSession.getContext()); return stompSession; }
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)); }