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;
}
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.
}
Aggregations