private <P extends Port<?>> P getEligibleJmxPort(Class<P> type, Collection<Port<?>> ports, Protocol protocol) { for (Port<?> port : ports) { if (State.ACTIVE == port.getDesiredState() && State.ERRORED != port.getState() && port.getProtocols().contains(protocol)) { return type.cast(port); } } return null; }
if(!getName().equals(updated.getName())) int newPort = updated.getPort(); if (getPort() != newPort && newPort != 0) if (p.getBoundPort() == newPort || p.getPort() == newPort) + p.getName()); Collection<Transport> transports = updated.getTransports(); Collection<Protocol> protocols = updated.getProtocols(); if (usesSsl) if (updated.getKeyStore() == null) validateAuthenticationMechanisms(updated.getAuthenticationProvider(), updated.getTransports()); boolean requiresCertificate = updated.getNeedClientAuth() || updated.getWantClientAuth(); if ((updated.getTrustStores() == null || updated.getTrustStores().isEmpty() ) && requiresCertificate) if(requiresCertificate && updated.getClientCertRecorder() != null) if(!(updated.getClientCertRecorder() instanceof ManagedPeerCertificateTrustStore))
if (p != this && (p.getPort() == getPort() || p.getBoundPort() == getPort())) + getPort() + " is already configured for port " + p.getName());
@Override protected void onOpen() { super.onOpen(); String bindingAddress = getPort().getBindingAddress(); Thread thread = new Thread(new NetworkAddressResolver(), "Network Address Resolver (Port: " + (useAllAddresses(bindingAddress) ? "" : bindingAddress) + ":" + getPort().getPort() +")"); thread.setDaemon(true); thread.start(); }
String bindingAddress = getPort().getBindingAddress(); try LOG.error("Unable to correctly calculate host name aliases for port " + getPort().getName() + ". This may lead to connection failures.", e);
return response -> final NamedAddressSpace addressSpace = configuration.getPort(request).getAddressSpace(request.getServerName()); request)); final NamedAddressSpace addressSpace = configuration.getPort(request).getAddressSpace(request.getServerName());
private Collection<HttpPort<?>> getEligibleHttpPorts(Collection<Port<?>> ports) { Collection<HttpPort<?>> httpPorts = new HashSet<>(); for (Port<?> port : ports) { if (State.ACTIVE == port.getDesiredState() && State.ERRORED != port.getState() && port.getProtocols().contains(Protocol.HTTP)) { httpPorts.add((HttpPort<?>) port); } } return Collections.unmodifiableCollection(httpPorts); }