private String assembleURI(final String scheme, final NetworkInterfaceBinding interfaceBinding, final int port, final int defaultPort, final HttpServerExchange exchange) throws URISyntaxException { final int p = (port != defaultPort ? port : -1); final String hostname = getRedirectHostname(interfaceBinding.getAddress(), exchange); if (hostname == null) { return NO_REDIRECT; } return new URI(scheme, null, hostname, p, CONSOLE_PATH, null, null).toString(); }
builder.advertise() .setAdvertiseSocketAddress(binding.getMulticastSocketAddress()) .setAdvertiseInterface(binding.getNetworkInterfaceBinding().getAddress())
/** * Returns the source address of this outbound socket binding if one is configured. If no explicit source address * is specified for this binding, then this method returns {@code null}. Use {@link #getSourceAddress()} * instead to obtain the default interface of the socket binding manager if none is specified for this binding. * * @return source address of this outbound socket binding if specified, * {@code null} otherwise */ public InetAddress getOptionalSourceAddress() { return sourceNetworkInterface != null ? sourceNetworkInterface.getAddress() : null; }
/** * Returns the source address of this outbound socket binding. If no explicit source address is specified * for this binding, then this method returns the address of the default interface that's configured * for the socket binding group * * @return */ public InetAddress getSourceAddress() { return this.sourceNetworkInterface != null ? this.sourceNetworkInterface.getAddress() : this.socketBindingManager.getDefaultInterfaceAddress(); }
/** * Returns the source address of this outbound socket binding. If no explicit source address is specified * for this binding, then this method returns the address of the default interface that's configured * for the socket binding group. * * @return source address of this outbound socket binding if specified, * default interface of the socket binding manager otherwise */ public InetAddress getSourceAddress() { return this.sourceNetworkInterface != null ? this.sourceNetworkInterface.getAddress() : this.socketBindingManager.getDefaultInterfaceAddress(); }
private String assembleURI(final String scheme, final NetworkInterfaceBinding interfaceBinding, final int port, final int defaultPort, final HttpServerExchange exchange) throws URISyntaxException { final int p = (port != defaultPort ? port : -1); final String hostname = getRedirectHostname(interfaceBinding.getAddress(), exchange); if (hostname == null) { return NO_REDIRECT; } return new URI(scheme, null, hostname, p, CONSOLE_PATH, null, null).toString(); }
private String assembleURI(final String scheme, final NetworkInterfaceBinding interfaceBinding, final int port, final int defaultPort, final HttpServerExchange exchange) throws URISyntaxException { final int p = (port != defaultPort ? port : -1); final String hostname = getRedirectHostname(interfaceBinding.getAddress(), exchange); if (hostname == null) { return NO_REDIRECT; } return new URI(scheme, null, hostname, p, CONSOLE_PATH, null, null).toString(); }
/** * Return the resolved {@link InetAddress} for this binding. * * @return the resolve address */ public InetAddress getAddress() { return networkInterface != null ? networkInterface.getAddress() : socketBindings.getDefaultInterfaceAddress(); }
/** * Return the resolved {@link InetAddress} for this binding. * * @return the resolve address */ public InetAddress getAddress() { return networkInterface != null ? networkInterface.getAddress() : socketBindings.getDefaultInterfaceAddress(); }
/** * Returns the source address of this outbound socket binding. If no explicit source address is specified * for this binding, then this method returns the address of the default interface that's configured * for the socket binding group * * @return */ public InetAddress getSourceAddress() { return this.sourceNetworkInterface != null ? this.sourceNetworkInterface.getAddress() : this.socketBindingManager.getDefaultInterfaceAddress(); }
/** * Return the resolved {@link InetAddress} for this binding. * * @return the resolve address */ public InetAddress getAddress() { return networkInterface != null ? networkInterface.getAddress() : socketBindings.getDefaultInterfaceAddress(); }
@Override public InetAddress getDefaultInterfaceAddress() { return defaultInterfaceBinding.getValue().getAddress(); }
@Override InetSocketAddress getSocketAddress() { return new InetSocketAddress(interfaceBindingValue.getValue().getAddress(), port); }
@Override public InetAddress getDefaultInterfaceAddress() { return defaultInterfaceBinding.getValue().getAddress(); }
@Override public InetAddress getDefaultInterfaceAddress() { return defaultInterfaceBinding.getValue().getAddress(); }
@Override public InetAddress getDefaultInterfaceAddress() { return defaultInterfaceBinding.getValue().getAddress(); }
private InetAddress getNonWildCardManagementAddress() throws UnknownHostException { InetAddress binding = interfaceBinding.getValue().getAddress(); return binding.isAnyLocalAddress() ? InetAddress.getLocalHost() : binding; }
@Override ManagedBinding registerSocketBinding(SocketBindingManager socketBindingManager) { InetSocketAddress address = new InetSocketAddress(interfaceBindingValue.getValue().getAddress(), port); ManagedBinding binding = ManagedBinding.Factory.createSimpleManagedBinding("management-native", address, null); socketBindingManager.getUnnamedRegistry().registerBinding(binding); return binding; }
@Override ManagedBinding registerSocketBinding(SocketBindingManager socketBindingManager) { InetSocketAddress address = new InetSocketAddress(interfaceBindingValue.getValue().getAddress(), port); ManagedBinding binding = ManagedBinding.Factory.createSimpleManagedBinding("management-native", address, null); socketBindingManager.getUnnamedRegistry().registerBinding(binding); return binding; }
private URL getConnectionURL() throws StartException { SocketBinding socketBinding = injectedHttpSocketBinding.getValue(); InetAddress address = socketBinding.getNetworkInterfaceBinding().getAddress(); URL result; try { String hostAddress = NetworkUtils.formatPossibleIpv6Address(address.getHostAddress()); result = new URL(socketBinding.getName() + "://" + hostAddress + ":" + socketBinding.getPort()); } catch (MalformedURLException ex) { throw new StartException(ex); } return result; }