Search in sources :

Example 6 with Transport

use of org.glassfish.grizzly.config.dom.Transport in project Payara by payara.

the class CreateHttpListener method createOrGetTransport.

private boolean createOrGetTransport(final AdminCommandContext context) throws TransactionFailure {
    boolean newTransport = false;
    for (Transport t : networkConfig.getTransports().getTransport()) {
        if (!t.getName().equals(DEFAULT_TRANSPORT)) {
            newTransport = true;
        }
    }
    if (newTransport) {
        final CreateTransport command = (CreateTransport) runner.getCommand("create-transport", context.getActionReport(), context.getLogger());
        command.transportName = listenerId;
        command.acceptorThreads = acceptorThreads;
        command.target = target;
        command.execute(context);
        checkProgress(context);
        newTransport = true;
    }
    return newTransport;
}
Also used : Transport(org.glassfish.grizzly.config.dom.Transport)

Example 7 with Transport

use of org.glassfish.grizzly.config.dom.Transport in project Payara by payara.

the class PersistenceTest method doTest.

public void doTest() throws TransactionFailure {
    NetworkListeners service = getHabitat().getService(NetworkListeners.class);
    // now do a transaction
    ConfigSupport.apply(new SingleConfigCode<Transport>() {

        public Object run(Transport param) {
            param.setAcceptorThreads("8989");
            return null;
        }
    }, service.getNetworkListener().get(0).findTransport());
// To change body of implemented methods use File | Settings | File Templates.
}
Also used : NetworkListeners(org.glassfish.grizzly.config.dom.NetworkListeners) Transport(org.glassfish.grizzly.config.dom.Transport)

Aggregations

Transport (org.glassfish.grizzly.config.dom.Transport)7 Config (com.sun.enterprise.config.serverbeans.Config)3 ActionReport (org.glassfish.api.ActionReport)3 CommandTarget (org.glassfish.config.support.CommandTarget)3 NetworkConfig (org.glassfish.grizzly.config.dom.NetworkConfig)3 NetworkListener (org.glassfish.grizzly.config.dom.NetworkListener)3 Transports (org.glassfish.grizzly.config.dom.Transports)3 Target (org.glassfish.internal.api.Target)3 PropertyVetoException (java.beans.PropertyVetoException)2 Http (org.glassfish.grizzly.config.dom.Http)2 NetworkListeners (org.glassfish.grizzly.config.dom.NetworkListeners)2 Protocol (org.glassfish.grizzly.config.dom.Protocol)2 Ssl (org.glassfish.grizzly.config.dom.Ssl)2 ThreadPool (org.glassfish.grizzly.config.dom.ThreadPool)2 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)2 MonitoringService (com.sun.enterprise.config.serverbeans.MonitoringService)1 SystemProperty (com.sun.enterprise.config.serverbeans.SystemProperty)1 VirtualServer (com.sun.enterprise.config.serverbeans.VirtualServer)1 GlassFishException (org.glassfish.embeddable.GlassFishException)1 ConfigException (org.glassfish.embeddable.web.ConfigException)1