iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/csiv2/ElytronSASClientInterceptor.java
private URI getURI(final ClientRequestInfo clientRequestInfo) throws URISyntaxException {
        final StringBuilder builder = new StringBuilder("iiop:");
        if (clientRequestInfo instanceof ClientRequestInfoImpl) {
            ClientRequestInfoImpl infoImpl = (ClientRequestInfoImpl) clientRequestInfo;
            CorbaConnection connection = (CorbaConnection) infoImpl.connection();
            if(connection == null) {
                return null;
            }
            ContactInfo info = connection.getContactInfo();
            if (info instanceof SocketOrChannelContactInfoImpl) {
                String hostname = ((SocketOrChannelContactInfoImpl) info).getHost();
                if (hostname != null)
                    builder.append("//").append(hostname);
                int port = ((SocketOrChannelContactInfoImpl) info).getPort();
                if (port > 0)
                    builder.append(":").append(port);
            }
        } else {
            return null;
        }
        return new URI(builder.toString());
    }
private URI getURI(final ClientRequestInfo clientRequestInfo) throws URISyntaxException {
        final StringBuilder builder = new StringBuilder("iiop:");
        if (clientRequestInfo instanceof ClientRequestInfoImpl) {
            ClientRequestInfoImpl infoImpl = (ClientRequestInfoImpl) clientRequestInfo;
            CorbaConnection connection = (CorbaConnection) infoImpl.connection();
            if(connection == null) {
                return null;
            }
            ContactInfo info = connection.getContactInfo();
            if (info instanceof SocketOrChannelContactInfoImpl) {
                String hostname = ((SocketOrChannelContactInfoImpl) info).getHost();
                if (hostname != null)
                    builder.append("//").append(hostname);
                int port = ((SocketOrChannelContactInfoImpl) info).getPort();
                if (port > 0)
                    builder.append(":").append(port);
            }
        } else {
            return null;
        }
        return new URI(builder.toString());
    }
private URI getURI ( final ClientRequestInfo clientRequestInfo ) throws URISyntaxException { final StringBuilder builder = new StringBuilder ( "iiop:" ) ; if ( clientRequestInfo instanceof ClientRequestInfoImpl ) { ClientRequestInfoImpl infoImpl = ( ClientRequestInfoImpl ) clientRequestInfo ; CorbaConnection connection = ( CorbaConnection ) infoImpl . connection ( ) ; if ( connection == null ) { return null ; } ContactInfo info = connection . getContactInfo ( ) ; if ( info instanceof SocketOrChannelContactInfoImpl ) { String hostname = ( ( SocketOrChannelContactInfoImpl ) info ) . getHost ( ) ; if ( hostname != null ) builder . append ( "//" ) . append ( hostname ) ; int port = ( ( SocketOrChannelContactInfoImpl ) info ) . getPort ( ) ; if ( port > 0 ) builder . append ( ":" ) . append ( port ) ; } } else { return null ; } return new URI ( builder . toString ( ) ) ; }
Build an {@link URI} using the information extracted from the specified {@link ClientRequestInfo}. The format of
the URI built by this method is "iiop://hostname:port".

@param clientRequestInfo the {@link ClientRequestInfo} used to obtain the target information necessary to build
the {@link URI}.
@return the constructed {@link URI} instance.
@throws URISyntaxException if a syntax error is found when building the {@link URI}.
Build an { @link URI } using the information extracted from the specified { @link ClientRequestInfo } . The format of the URI built by this method is iiop : // hostname : port .