mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/RemoteChannelLookupImpl.java
private SystemChannels translateToProto(final Set<RemoteChannel> channels, final int systemId)
    {
        final SystemChannels.Builder builder = SystemChannels.newBuilder().setSysId(systemId);
        
        for (RemoteChannel channel : channels)
        {
            if (channel instanceof ClientSocketChannel)
            {
                final ClientSocketChannel clientSocketChannel = (ClientSocketChannel)channel;
                builder.addSocketChannel(SocketChannelType.newBuilder()
                        .setHost(clientSocketChannel.getHost())
                        .setPort(clientSocketChannel.getPort())
                        .setSslEnabled(clientSocketChannel.isSslEnabled())
                        .build());
            }
            else if (channel instanceof TransportChannel)
            {
                final TransportChannel transportChannel = (TransportChannel)channel;
                builder.addTransportChannel(TransportChannelType.newBuilder()
                        .setTransportName(transportChannel.getTransportLayerName())
                        .setLocalAddress(transportChannel.getLocalMessageAddress())
                        .setRemoteAddress(transportChannel.getRemoteMessageAddress())
                        .build());
            }
        }           
        
        return builder.build();
    }
/**
     * Translate the channel set to data modeled by proto class {@link SystemChannels}.
     * 
     * @param channels
     *      channel set to serialize
     * @param systemId
     *      system id for the channel set, will be included in XML data
     * @return
     *      system channel data
     */
Translate the channel set to data modeled by proto class  SystemChannels.

@param channels
channel set to serialize
@param systemId
system id for the channel set, will be included in XML data
@return
system channel data
Translate the channel set to data modeled by proto class SystemChannels . @param channels channel set to serialize @param systemId system id for the channel set will be included in XML data @return system channel data
private SystemChannels translateToProto(final Set<RemoteChannel> channels, final int systemId)
    {
        final SystemChannels.Builder builder = SystemChannels.newBuilder().setSysId(systemId);
        for (RemoteChannel channel : channels)
        {
            if (channel instanceof ClientSocketChannel)
            {
                final ClientSocketChannel clientSocketChannel = (ClientSocketChannel)channel;
                builder.addSocketChannel(SocketChannelType.newBuilder()
                        .setHost(clientSocketChannel.getHost())
                        .setPort(clientSocketChannel.getPort())
                        .setSslEnabled(clientSocketChannel.isSslEnabled())
                        .build());
            }
            else if (channel instanceof TransportChannel)
            {
                final TransportChannel transportChannel = (TransportChannel)channel;
                builder.addTransportChannel(TransportChannelType.newBuilder()
                        .setTransportName(transportChannel.getTransportLayerName())
                        .setLocalAddress(transportChannel.getLocalMessageAddress())
                        .setRemoteAddress(transportChannel.getRemoteMessageAddress())
                        .build());
            }
        }           
        return builder.build();
    }
private SystemChannels translateToProto ( final Set < RemoteChannel > channels , final int systemId ) { final SystemChannels . Builder builder = SystemChannels . newBuilder ( ) . setSysId ( systemId ) ; for ( RemoteChannel channel : channels ) { if ( channel instanceof ClientSocketChannel ) { final ClientSocketChannel clientSocketChannel = ( ClientSocketChannel ) channel ; builder . addSocketChannel ( SocketChannelType . newBuilder ( ) . setHost ( clientSocketChannel . getHost ( ) ) . setPort ( clientSocketChannel . getPort ( ) ) . setSslEnabled ( clientSocketChannel . isSslEnabled ( ) ) . build ( ) ) ; } else if ( channel instanceof TransportChannel ) { final TransportChannel transportChannel = ( TransportChannel ) channel ; builder . addTransportChannel ( TransportChannelType . newBuilder ( ) . setTransportName ( transportChannel . getTransportLayerName ( ) ) . setLocalAddress ( transportChannel . getLocalMessageAddress ( ) ) . setRemoteAddress ( transportChannel . getRemoteMessageAddress ( ) ) . build ( ) ) ; } } return builder . build ( ) ; }
Translate the channel set to data modeled by proto class {@link SystemChannels}.
Translate the channel set to data modeled by proto class { @link SystemChannels } .