本文整理汇总了Java中org.wildfly.extras.creaper.core.online.OnlineOptions类的典型用法代码示例。如果您正苦于以下问题:Java OnlineOptions类的具体用法?Java OnlineOptions怎么用?Java OnlineOptions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OnlineOptions类属于org.wildfly.extras.creaper.core.online包,在下文中一共展示了OnlineOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
AddSecurityRealm addSecurityRealm = new AddSecurityRealm.Builder(TEST_SECURITY_REALM_NAME).build();
client.apply(addSecurityRealm);
assertTrue("The security realm should be created", ops.exists(TEST_SECURITY_REALM_ADDRESS));
AddLdapConnection addLdapConnection = new AddLdapConnection.Builder(TEST_LDAP_CONNECTION)
.url("ldap://localhost:10389")
.build();
client.apply(addLdapConnection);
assertTrue("Ldap outbound connection should be created", ops.exists(TEST_LDAP_CONNECTION_ADDRESS));
}
示例2: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
admin = new Administration(client);
if (client.version().lessThan(ServerVersion.VERSION_2_0_0)) { // AS7, JBoss Web
webSubsystem = "web";
defaultHostAddress = Address.subsystem("web").and("virtual-server", "default-host");
jspConfigurationAddress = Address.subsystem("web").and("configuration", "jsp-configuration");
httpConnectorAddress = Address.subsystem("web").and("connector", "http");
requestCountAttribute = "requestCount";
} else { // WildFly, Undertow
webSubsystem = "undertow";
defaultHostAddress = Address.subsystem("undertow").and("server", "default-server").and("host", "default-host");
jspConfigurationAddress = Address.subsystem("undertow").and("servlet-container", "default").and("setting", "jsp");
httpConnectorAddress = Address.subsystem("undertow").and("server", "default-server").and("http-listener", "default");
requestCountAttribute = "request-count";
}
}
示例3: createManagementClient
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
/**
* As {@link WildFlyNode#createManagementClient()}, but you can define a positive connection
* timeout in milliseconds.
*/
public OnlineManagementClient createManagementClient(int timeoutInMillis) throws IOException {
OnlineOptions.ConnectionOnlineOptions options = isDomain
? OnlineOptions.domain().forProfile(defaultProfile).forHost(defaultHost).build()
: OnlineOptions.standalone();
OnlineOptions.OptionalOnlineOptions clientOptions = options
.hostAndPort(getPublicAddress(), getMgmtPort())
.auth(mgmtUser, mgmtPassword)
.connectionTimeout(timeoutInMillis)
.bootTimeout(1000 * (int) getBootTimeoutInSec());
return ManagementClient.online(clientOptions.build());
}
示例4: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
Assume.assumeTrue(client.version().greaterThanOrEqualTo(ServerVersion.VERSION_3_0_0));
ops = new Operations(client);
admin = new Administration(client);
}
示例5: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException, CommandFailedException, OperationException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
ops.removeIfExists(Address.subsystem("web").and("connector", TEST_CONNECTOR_NAME));
client.apply(new AddConnector.Builder(TEST_CONNECTOR_NAME)
.protocol("HTTP/1.1")
.scheme("https")
.socketBinding("https")
.enabled(false)
.build());
}
示例6: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
AddSecurityDomain addSecurityDomain = new AddSecurityDomain.Builder(TEST_SECURITY_DOMAIN_NAME).build();
client.apply(addSecurityDomain);
assertTrue("The security domain should be created", ops.exists(TEST_SECURITY_DOMAIN_ADDRESS));
}
示例7: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
AddSecurityRealm addSecurityRealm = new AddSecurityRealm.Builder(TEST_REALM_NAME).build();
client.apply(addSecurityRealm);
assertTrue("The security realm should be created", ops.exists(TEST_REALM_ADDRESS));
}
示例8: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
AddSecurityRealm addSecurityRealm = new AddSecurityRealm.Builder(TEST_SECURITY_REALM_NAME).build();
client.apply(addSecurityRealm);
assertTrue("The security realm should be created", ops.exists(TEST_SECURITY_REALM_ADDRESS));
}
示例9: checkServerVersionIsSupported
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@BeforeClass
public static void checkServerVersionIsSupported() throws IOException {
ServerVersion serverVersion
= ManagementClient.online(OnlineOptions.standalone().localDefault().build()).version();
Assume.assumeTrue("Kerberos authentication in security realm is available since WildFly 9 or in EAP 6.4.x.",
serverVersion.greaterThanOrEqualTo(ServerVersion.VERSION_1_7_0)
&& !serverVersion.inRange(ServerVersion.VERSION_2_0_0, ServerVersion.VERSION_2_2_0));
}
示例10: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException, CommandFailedException, OperationException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
AddSecurityDomain addSecurityDomain = new AddSecurityDomain.Builder(TEST_SECURITY_DOMAIN_NAME).build();
client.apply(addSecurityDomain);
assertTrue("The security domain should be created", ops.exists(TEST_SECURITY_DOMAIN_ADDRESS));
}
示例11: prepare
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void prepare() throws IOException, OperationException, TimeoutException, InterruptedException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
admin = new Administration(client);
ops.removeIfExists(TEST_DEPLOYMENT_ADDRESS);
admin.reloadIfRequired();
}
示例12: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
ops = new Operations(client);
administration = new Administration(client);
reconnectTimeoutSupported = true;
if (client.version().lessThan(ServerVersion.VERSION_1_7_0)
|| client.version().inRange(ServerVersion.VERSION_2_0_0, ServerVersion.VERSION_2_2_0)) {
reconnectTimeoutSupported = false;
}
}
示例13: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws IOException {
client = ManagementClient.online(OnlineOptions
.standalone()
.localDefault()
.build());
ops = new Operations(client);
}
示例14: connect
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
@Before
public void connect() throws Exception {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
assumeTrue("The test requires Undertow that supports HTTP/2 options on listener, which is available since WildFly 9",
client.version().greaterThanOrEqualTo(ServerVersion.VERSION_3_0_0));
ops = new Operations(client);
admin = new Administration(client);
client.apply(new AddSocketBinding.Builder(TEST_SOCKET_BINDING).port(12345).build());
admin.reloadIfRequired();
}
示例15: assertServerNotRunning
import org.wildfly.extras.creaper.core.online.OnlineOptions; //导入依赖的package包/类
private void assertServerNotRunning() throws Exception {
assertFalse(controller.isStarted(ManualTests.ARQUILLIAN_CONTAINER));
OnlineManagementClient client = null;
try {
client = ManagementClient.online(OnlineOptions.standalone().localDefault().build());
fail("server is still running");
} catch (IOException ignored) {
// expected
} finally {
if (client != null) {
client.close();
}
}
}