InetSocketAddress bindAddress = null;
InetSocketAddress secureBindAddress = null;
SocketBinding basicBinding = injectedSocketBindingValue.getOptionalValue();
SocketBinding secureBinding = injectedSecureSocketBindingValue.getOptionalValue();
final NetworkInterfaceBinding interfaceBinding = interfaceBindingValue.getOptionalValue();
if (interfaceBinding != null) {
useUnmanagedBindings = true;
final int port = portValue.getOptionalValue();
if (port > 0) {
bindAddress = new InetSocketAddress(interfaceBinding.getAddress(), port);
}
final int securePort = securePortValue.getOptionalValue();
if (securePort > 0) {
secureBindAddress = new InetSocketAddress(interfaceBinding.getAddress(), securePort);
}
} else {
if (basicBinding != null) {
bindAddress = basicBinding.getSocketAddress();
}