public XnioWorker.Builder buildXnioWorker(final Xnio xnio) { this.xnioWorker = null; return this.workerBuilder = xnio.createWorkerBuilder(); }
static XnioWorker parseWorker(Xnio xnio, ClientConfiguration clientConfiguration) throws ConfigXMLParseException, IOException { final XnioWorker.Builder builder = xnio.createWorkerBuilder(); if (clientConfiguration == null) { return null; } builder.setDaemon(true); final ConfigurationXMLStreamReader reader = clientConfiguration.readConfiguration(Collections.singleton(NS_XNIO_3_5)); parseDocument(reader, builder); return builder.build(); }
/** * Construct a new XNIO worker. * * @param threadGroup the thread group for worker threads * @param optionMap the options to use to configure the worker * @param terminationTask the task to run after the worker has shut down * @return the new worker * @throws IOException if the worker failed to be opened * @throws IllegalArgumentException if an option value is invalid for this worker */ public XnioWorker createWorker(ThreadGroup threadGroup, OptionMap optionMap, Runnable terminationTask) throws IOException, IllegalArgumentException { final XnioWorker.Builder workerBuilder = createWorkerBuilder(); workerBuilder.populateFromOptions(optionMap); workerBuilder.setThreadGroup(threadGroup); workerBuilder.setTerminationTask(terminationTask); return workerBuilder.build(); }
public XnioWorker.Builder buildXnioWorker(final Xnio xnio) { this.xnioWorker = null; return this.workerBuilder = xnio.createWorkerBuilder(); }
/** * @deprecated Use {@link #WorkerService(XnioWorker.Builder)} instead to allow setting of full range of options. */ public WorkerService(OptionMap optionMap) { this(Xnio.getInstance().createWorkerBuilder().populateFromOptions(optionMap)); }
/** * @deprecated Use {@link #WorkerService(XnioWorker.Builder)} instead to allow setting of full range of options. */ public WorkerService(OptionMap optionMap) { this(Xnio.getInstance().createWorkerBuilder().populateFromOptions(optionMap)); }
static XnioWorker parseWorker(Xnio xnio, ClientConfiguration clientConfiguration) throws ConfigXMLParseException, IOException { final XnioWorker.Builder builder = xnio.createWorkerBuilder(); if (clientConfiguration == null) { return null; } builder.setDaemon(true); final ConfigurationXMLStreamReader reader = clientConfiguration.readConfiguration(Collections.singleton(NS_XNIO_3_5)); parseDocument(reader, builder); return builder.build(); }
/** * Construct a new XNIO worker. * * @param threadGroup the thread group for worker threads * @param optionMap the options to use to configure the worker * @param terminationTask the task to run after the worker has shut down * @return the new worker * @throws IOException if the worker failed to be opened * @throws IllegalArgumentException if an option value is invalid for this worker */ public XnioWorker createWorker(ThreadGroup threadGroup, OptionMap optionMap, Runnable terminationTask) throws IOException, IllegalArgumentException { final XnioWorker.Builder workerBuilder = createWorkerBuilder(); workerBuilder.populateFromOptions(optionMap); workerBuilder.setThreadGroup(threadGroup); workerBuilder.setTerminationTask(terminationTask); return workerBuilder.build(); }
int allWorkerCount = workers.asList().size(); final String name = context.getCurrentAddressValue(); final XnioWorker.Builder builder = Xnio.getInstance().createWorkerBuilder();
int allWorkerCount = workers.asList().size(); final String name = context.getCurrentAddressValue(); final XnioWorker.Builder builder = Xnio.getInstance().createWorkerBuilder();