本文整理汇总了Java中org.apache.activemq.artemis.core.config.impl.ConfigurationImpl.addAcceptorConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationImpl.addAcceptorConfiguration方法的具体用法?Java ConfigurationImpl.addAcceptorConfiguration怎么用?Java ConfigurationImpl.addAcceptorConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.activemq.artemis.core.config.impl.ConfigurationImpl
的用法示例。
在下文中一共展示了ConfigurationImpl.addAcceptorConfiguration方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createConfig
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
protected Configuration createConfig(final String hostAddress, final int serverID, final int port) throws Exception {
ConfigurationImpl configuration = new ConfigurationImpl().setJMXManagementEnabled(false).
setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(1000 * 1024).setJournalType(JournalType.NIO).
setJournalDirectory(getJournalDir(serverID, false)).
setBindingsDirectory(getBindingsDir(serverID, false)).
setPagingDirectory(getPageDir(serverID, false)).
setLargeMessagesDirectory(getLargeMessagesDir(serverID, false)).
setJournalCompactMinFiles(0).
setJournalCompactPercentage(0).
setClusterPassword(CLUSTER_PASSWORD);
configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateJmsQueues(true).setAutoDeleteJmsQueues(true));
configuration.addAcceptorConfiguration("netty", newURIwithPort(hostAddress, port));
configuration.addConnectorConfiguration("netty-connector", newURIwithPort(hostAddress, port));
return configuration;
}
示例2: createConfig
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
protected Configuration createConfig(final String hostAddress, final int serverID) throws Exception {
ConfigurationImpl configuration = new ConfigurationImpl().setJMXManagementEnabled(false).
setSecurityEnabled(false).setJournalMinFiles(2).setJournalFileSize(1000 * 1024).setJournalType(JournalType.NIO).
setJournalDirectory(getJournalDir(serverID, false)).
setBindingsDirectory(getBindingsDir(serverID, false)).
setPagingDirectory(getPageDir(serverID, false)).
setLargeMessagesDirectory(getLargeMessagesDir(serverID, false)).
setJournalCompactMinFiles(0).
setJournalCompactPercentage(0).
setClusterPassword(CLUSTER_PASSWORD);
configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateJmsQueues(true).setAutoDeleteJmsQueues(true));
configuration.addAcceptorConfiguration("netty", newURI(hostAddress, serverID));
configuration.addConnectorConfiguration("netty-connector", newURI(hostAddress, serverID));
return configuration;
}
示例3: createCustomSslServer
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
private void createCustomSslServer() throws Exception {
Map<String, Object> params = new HashMap<>();
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, getSuitableCipherSuite());
params.put(TransportConstants.SSL_KRB5_CONFIG_PROP_NAME, "core-tls-krb5-server");
ConfigurationImpl config = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params, "nettySSL"));
config.setPopulateValidatedUser(true); // so we can verify the kerb5 id is present
config.setSecurityEnabled(true);
config.addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY));
ActiveMQSecurityManager securityManager = new ActiveMQJAASSecurityManager("Krb5Plus");
server = addServer(ActiveMQServers.newActiveMQServer(config, ManagementFactory.getPlatformMBeanServer(), securityManager, false));
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
final String roleName = "ALLOW_ALL";
Role role = new Role(roleName, true, true, true, true, true, true, true, true, true, true);
Set<Role> roles = new HashSet<>();
roles.add(role);
securityRepository.addMatch(QUEUE.toString(), roles);
server.start();
waitForServerToStart(server);
// note kerberos user does not exist on the broker save as a role member in dual-authentication-roles.properties
userPrincipal = CLIENT_PRINCIPAL + "@" + kdc.getRealm();
tc = new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
inVMTc = new TransportConfiguration(INVM_CONNECTOR_FACTORY);
}
示例4: setUp
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
super.setUp();
Map<String, Object> params = new HashMap<>();
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
params.put(TransportConstants.KEYSTORE_PATH_PROP_NAME, SERVER_SIDE_KEYSTORE);
params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, PASSWORD);
params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, SERVER_SIDE_TRUSTSTORE);
params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, PASSWORD);
params.put(TransportConstants.NEED_CLIENT_AUTH_PROP_NAME, true);
params.put(TransportConstants.PORT_PROP_NAME, "61617");
ConfigurationImpl config = createBasicConfig();
config.addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params));
config.addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY));
config.setSecurityEnabled(true);
ActiveMQSecurityManager securityManager = new ActiveMQJAASSecurityManager("DualAuthenticationPropertiesLogin", "DualAuthenticationCertLogin");
server = addServer(ActiveMQServers.newActiveMQServer(config, ManagementFactory.getPlatformMBeanServer(), securityManager, false));
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
Role sendRole = new Role("producers", true, false, true, false, true, false, false, false, false, false);
Role receiveRole = new Role("consumers", false, true, false, false, false, false, false, false, false, false);
Set<Role> roles = new HashSet<>();
roles.add(sendRole);
roles.add(receiveRole);
securityRepository.addMatch(DualAuthenticationTest.QUEUE.toString(), roles);
server.start();
waitForServerToStart(server);
tc = new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
}
示例5: createDefaultConfig
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
protected Configuration createDefaultConfig(final Map<String, Object> params,
final String... acceptors) throws Exception {
ConfigurationImpl configuration = createBasicConfig(-1).setJMXManagementEnabled(false).clearAcceptorConfigurations();
for (String acceptor : acceptors) {
TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
configuration.addAcceptorConfiguration(transportConfig);
}
return configuration;
}
示例6: createDefaultConfig
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; //导入方法依赖的package包/类
protected Configuration createDefaultConfig(final int serverID, final boolean netty) throws Exception {
ConfigurationImpl configuration = createBasicConfig(serverID).setJMXManagementEnabled(false).addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY, generateInVMParams(serverID), "invm"));
if (netty) {
configuration.addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, new HashMap<String, Object>(), "netty", new HashMap<String, Object>()));
}
return configuration;
}