當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。