@Override public void initialize(Fraction.InitContext initContext) { initContext.socketBinding( new SocketBinding("http") .port(SwarmProperties.propertyVar(SwarmProperties.HTTP_PORT, "8080"))); initContext.socketBinding( new SocketBinding("https") .port(SwarmProperties.propertyVar(SwarmProperties.HTTPS_PORT, "8443"))); }
/** Exclude a module dependency, with the specified slot. * * @param name The name of the module. * @param slot The slot of the module. * @return this archive. */ @SuppressWarnings("unchecked") default T excludeModule(String name, String slot) { getDescriptorAsset().excludeModule(name, slot); return (T) this; }
/** Add a dependency on a given module, presuming the {@code main} slot. * * @param name The name of the module. * @return The added module descriptor. */ default Module addModule(String name) { return getDescriptorAsset().addModule(name); }
public void customize() { this.group.socketBinding( new SocketBinding("management-http") .iface(iface.get()) .port(fraction.httpPort())); this.group.socketBinding(new SocketBinding("management-https") .port(fraction.httpsPort())); if (fraction.isHttpDisable()) { fraction.httpInterfaceManagementInterface((HTTPInterfaceManagementInterface<?>) null); } }
/** * Determine if any value (default or explicit) is present. * * @return <code>true</code> is a value is present, otherwise <code>false</code>. */ public boolean isPresent() { return get(false) != null; }
/** * Set the port (or port expression). * * @param port The port (or port expression). * @return This connectoin. */ public RemoteConnection port(int port) { this.port.set(port); return this; }
public boolean setup(Archive<?> archive) throws Exception { return setupUsingAppPath(archive) || setupUsingAppArtifact(archive) || setupUsingMaven(archive); }
private synchronized T get(boolean throwIfNull) { return explicitOrElseGet(() -> this.defaultValue.get(throwIfNull)); }
@SuppressWarnings("unchecked") default T addMarker(String markerName) { addMarker(this, markerName); return (T) this; }
/** * Retrieve the default value, if any. * * @return The default value. * @throws NoSuchElementException if no default value is available. */ public T defaultValue() throws NoSuchElementException { return defaultValue(true); }
/** * Retrieve the explicitly set value, if any. * * @return The explicitly set value. * @throws NoSuchElementException if no explicit value is available. */ public T explicitValue() throws NoSuchElementException { return explicitValue(true); }
/** Exclude a module dependency, presuming the {@code main} slot. * * @param name The name of the module. * @return this archive. */ default T excludeModule(String name) { return excludeModule(name, "main"); }
public void customize() { this.group.socketBinding( new SocketBinding("management-http") .iface(iface.get()) .port(fraction.httpPort())); this.group.socketBinding(new SocketBinding("management-https") .port(fraction.httpsPort())); if (fraction.isHttpDisable()) { fraction.httpInterfaceManagementInterface((HTTPInterfaceManagementInterface<?>) null); } }
/** * Retrieve the value, regardless of it's origin. * * @return The value, if non-null. * @throws NoSuchElementException If no value (default nor explicit) is present. */ public T get() throws NoSuchElementException { return get(true); }
/** Add a dependency on a given module, presuming the {@code main} slot. * * @param name The name of the module. * @return The added module descriptor. */ default Module addModule(String name) { return getDescriptorAsset().addModule(name); }
/** Exclude a module dependency, with the specified slot. * * @param name The name of the module. * @param slot The slot of the module. * @return this archive. */ @SuppressWarnings("unchecked") default T excludeModule(String name, String slot) { getDescriptorAsset().excludeModule(name, slot); return (T) this; }
/** * Retrieve the default value, if any. * * @return The default value. * @throws NoSuchElementException if no default value is available. */ public T defaultValue() throws NoSuchElementException { return defaultValue(true); }
/** * Retrieve the explicitly set value, if any. * * @return The explicitly set value. * @throws NoSuchElementException if no explicit value is available. */ public T explicitValue() throws NoSuchElementException { return explicitValue(true); }
/** Add a dependency on a given module, with the specified slot. * * @param name The name of the module. * @param slot The slot of the module. * @return The added module descriptor. */ default Module addModule(String name, String slot) { return getDescriptorAsset().addModule(name, slot); }
/** Add a dependency on a given module, with the specified slot. * * @param name The name of the module. * @param slot The slot of the module. * @return The added module descriptor. */ default Module addModule(String name, String slot) { return getDescriptorAsset().addModule(name, slot); }