Java Code Examples for org.apache.activemq.artemis.core.config.Configuration#getAcceptorConfigurations()
The following examples show how to use
org.apache.activemq.artemis.core.config.Configuration#getAcceptorConfigurations() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenWireManagementTest.java From activemq-artemis with Apache License 2.0 | 6 votes |
@Override protected void extraServerConfig(Configuration serverConfig) { serverConfig.setJMXManagementEnabled(true); if (useDefault) { //don't set parameters explicitly return; } Set<TransportConfiguration> acceptorConfigs = serverConfig.getAcceptorConfigurations(); for (TransportConfiguration tconfig : acceptorConfigs) { if ("netty".equals(tconfig.getName())) { Map<String, Object> params = tconfig.getExtraParams(); params.put("supportAdvisory", supportAdvisory); params.put("suppressInternalManagementObjects", suppressJmx); } } }
Example 2
Source File: ColocatedHAManager.java From activemq-artemis with Apache License 2.0 | 6 votes |
private static void updateAcceptorsAndConnectors(Configuration backupConfiguration, int portOffset, List<String> remoteConnectors, boolean fullServer) { //we only do this if we are a full server, if scale down then our acceptors wont be needed and our connectors will // be the same as the parent server if (fullServer) { Set<TransportConfiguration> acceptors = backupConfiguration.getAcceptorConfigurations(); for (TransportConfiguration acceptor : acceptors) { updatebackupParams(backupConfiguration.getName(), portOffset, acceptor.getParams()); } Map<String, TransportConfiguration> connectorConfigurations = backupConfiguration.getConnectorConfigurations(); for (Map.Entry<String, TransportConfiguration> entry : connectorConfigurations.entrySet()) { //check to make sure we aren't a remote connector as this shouldn't be changed if (!remoteConnectors.contains(entry.getValue().getName())) { updatebackupParams(backupConfiguration.getName(), portOffset, entry.getValue().getParams()); } } } else { //if we are scaling down then we wont need any acceptors but clear anyway for belts and braces backupConfiguration.getAcceptorConfigurations().clear(); } }
Example 3
Source File: DisableAdvisoryTest.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override protected void extraServerConfig(Configuration serverConfig) { Set<TransportConfiguration> acceptors = serverConfig.getAcceptorConfigurations(); for (TransportConfiguration tc : acceptors) { if (tc.getName().equals("netty")) { tc.getExtraParams().put("supportAdvisory", "false"); break; } } }
Example 4
Source File: RemotingServiceImpl.java From activemq-artemis with Apache License 2.0 | 4 votes |
public RemotingServiceImpl(final ClusterManager clusterManager, final Configuration config, final ActiveMQServer server, final ManagementService managementService, final ScheduledExecutorService scheduledThreadPool, List<ProtocolManagerFactory> protocolManagerFactories, final Executor flushExecutor, final ServiceRegistry serviceRegistry) { this.serviceRegistry = serviceRegistry; acceptorsConfig = config.getAcceptorConfigurations(); this.server = server; this.clusterManager = clusterManager; setInterceptors(config); this.managementService = managementService; this.scheduledThreadPool = scheduledThreadPool; CoreProtocolManagerFactory coreProtocolManagerFactory = new CoreProtocolManagerFactory(); MessagePersister.registerProtocol(coreProtocolManagerFactory); this.flushExecutor = flushExecutor; ActiveMQServerLogger.LOGGER.addingProtocolSupport(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory.getModuleName()); this.protocolMap.put(coreProtocolManagerFactory.getProtocols()[0], coreProtocolManagerFactory); if (config.isResolveProtocols()) { resolveProtocols(this.getClass().getClassLoader()); if (this.getClass().getClassLoader() != Thread.currentThread().getContextClassLoader()) { resolveProtocols(Thread.currentThread().getContextClassLoader()); } } if (protocolManagerFactories != null) { loadProtocolManagerFactories(protocolManagerFactories); } this.connectionTtlCheckInterval = config.getConnectionTtlCheckInterval(); }