当前位置: 首页>>代码示例>>Java>>正文


Java OnlineOptions类代码示例

本文整理汇总了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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:17,代码来源:AddLdapAuthenticationOnlineTest.java

示例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";
    }
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:21,代码来源:OperationsTest.java

示例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());
}
 
开发者ID:wildfly-extras,项目名称:sunstone,代码行数:18,代码来源:WildFlyNode.java

示例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);
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:8,代码来源:AddConnectionFactoryToRAOnlineTest.java

示例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());
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:15,代码来源:AddConnectorSslConfigOnlineTest.java

示例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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:11,代码来源:AddLoginModuleOnlineTest.java

示例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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:11,代码来源:AddSecretAuthenticationOnlineTest.java

示例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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:11,代码来源:AddPropertiesAuthorizationOnlineTest.java

示例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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:9,代码来源:AddKerberosAuthenticationOnlineTest.java

示例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));
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:11,代码来源:RemoveMappingModuleOnlineTest.java

示例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();
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:9,代码来源:DeployUndeployCmdTest.java

示例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;
    }
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:13,代码来源:AddAuditLogTcpSyslogHandlerOnlineTest.java

示例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);
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:9,代码来源:SnapshotBackupTest.java

示例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();
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:12,代码来源:AddUndertowListenerOnlineTest.java

示例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();
        }
    }
}
 
开发者ID:wildfly-extras,项目名称:creaper,代码行数:16,代码来源:ShutdownTest.java


注:本文中的org.wildfly.extras.creaper.core.online.OnlineOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。