public Worker worker(java.lang.String key) { return this.workers.stream().filter(e -> e.getKey().equals(key)) .findFirst().orElse(null); } /**
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey) { outboundBindAddress(childKey, null); return (T) this; }
/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey) { server(childKey, null); return (T) this; }
/** * Create and configure a Worker object to the list of subresources * * @param key * The key for the Worker resource * @param config * The WorkerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T worker(java.lang.String childKey, WorkerConsumer consumer) { Worker<? extends Worker> child = new Worker<>(childKey); if (consumer != null) { consumer.accept(child); } worker(child); return (T) this; }
/** * Create and configure a Worker object to the list of subresources * * @param key * The key for the Worker resource * @param config * The WorkerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T worker(java.lang.String childKey, WorkerConsumer consumer) { Worker<? extends Worker> child = new Worker<>(childKey); if (consumer != null) { consumer.accept(child); } worker(child); return (T) this; }
public IOFraction applyDefaults() { return worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey) { server(childKey, null); return (T) this; }
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey) { outboundBindAddress(childKey, null); return (T) this; }
public Worker worker(java.lang.String key) { return this.workers.stream().filter(e -> e.getKey().equals(key)) .findFirst().orElse(null); } /**
public IOFraction applyDefaults() { return worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Install a supplied Server object to the list of subresources */ @SuppressWarnings("unchecked") public T server(ServerSupplier supplier) { server(supplier.get()); return (T) this; }
/** * Install a supplied OutboundBindAddress object to the list of subresources */ @SuppressWarnings("unchecked") public T outboundBindAddress(OutboundBindAddressSupplier supplier) { outboundBindAddress(supplier.get()); return (T) this; }
public static IOFraction createDefaultFraction() { return new IOFraction().worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Install a supplied Server object to the list of subresources */ @SuppressWarnings("unchecked") public T server(ServerSupplier supplier) { server(supplier.get()); return (T) this; }
/** * Install a supplied OutboundBindAddress object to the list of subresources */ @SuppressWarnings("unchecked") public T outboundBindAddress(OutboundBindAddressSupplier supplier) { outboundBindAddress(supplier.get()); return (T) this; }
public static IOFraction createDefaultFraction() { return new IOFraction().worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @param config * The ServerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey, ServerConsumer consumer) { Server<? extends Server> child = new Server<>(childKey); if (consumer != null) { consumer.accept(child); } server(child); return (T) this; }
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @param config * The OutboundBindAddressConsumer to use * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey, OutboundBindAddressConsumer consumer) { OutboundBindAddress<? extends OutboundBindAddress> child = new OutboundBindAddress<>( childKey); if (consumer != null) { consumer.accept(child); } outboundBindAddress(child); return (T) this; }
/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @param config * The ServerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey, ServerConsumer consumer) { Server<? extends Server> child = new Server<>(childKey); if (consumer != null) { consumer.accept(child); } server(child); return (T) this; }
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @param config * The OutboundBindAddressConsumer to use * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey, OutboundBindAddressConsumer consumer) { OutboundBindAddress<? extends OutboundBindAddress> child = new OutboundBindAddress<>( childKey); if (consumer != null) { consumer.accept(child); } outboundBindAddress(child); return (T) this; }