mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/comms/CustomCommsMessageService.java
private Message createTransportLayer(final CustomCommsNamespace ccommsMessage, final TerraHarvestMessage request,
        final RemoteChannel channel) throws IOException
    {
        final CreateTransportLayerRequestData createTransportLayer = CreateTransportLayerRequestData.
                parseFrom(ccommsMessage.getData());
        
        final String transportLayerType = createTransportLayer.getTransportLayerProductType();
        final String transportLayerName = createTransportLayer.getTransportLayerName();
        
        try
        {
            String linkLayerName = null;
            
            if (createTransportLayer.hasLinkLayerUuid()) 
            {
                final LinkLayer linkLayer = 
                        CustomCommUtility.getLinkLayerByUuid(m_CommsService, createTransportLayer.getLinkLayerUuid());
                linkLayerName = linkLayer.getName();
            }
            
            final TransportLayer createdTransportLayer = m_CommsService.createTransportLayer(transportLayerType,
                    transportLayerName, linkLayerName);

            final CreateTransportLayerResponseData response = CreateTransportLayerResponseData.newBuilder().
                    setInfo(SharedMessageUtils.createFactoryObjectInfoMessage(createdTransportLayer)).build();
            
            m_MessageFactory.createCustomCommsResponseMessage(request, 
                CustomCommsMessageType.CreateTransportLayerResponse, response).queue(channel);
        }
        catch (final CCommException e)
        {
            m_Logging.error(e, "CreateTransportLayer: Cannot create transport layer.");
            
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.CCOMM_ERROR, 
                    CUSTOM_COMMS_EXCEPTION + e.getMessage()).queue(channel);
        }
        return createTransportLayer;
    }
/**
     * Method to create a new instance of a {@link TransportLayer} and add it to the 
     * service.
     * @param ccommsMessage
     *      request message containing the transport layer type, name, timeout value, and associated link layer UUID
     *      for creating a new transport layer.
     * @param request
     *      entire remote message for the request
     * @param channel
     *      channel to use for sending a response
     * @return
     *      the data message for this request
     * @throws IOException 
     *      if message cannot be parsed or response message cannot be sent
     */
Method to create a new instance of a  TransportLayer and add it to the
service.
@param ccommsMessage
request message containing the transport layer type, name, timeout value, and associated link layer UUID
for creating a new transport layer.
@param request
entire remote message for the request
@param channel
channel to use for sending a response
@return
the data message for this request
@throws IOException
if message cannot be parsed or response message cannot be sent
Method to create a new instance of a TransportLayer and add it to the service . @param ccommsMessage request message containing the transport layer type name timeout value and associated link layer UUID for creating a new transport layer . @param request entire remote message for the request @param channel channel to use for sending a response @return the data message for this request @throws IOException if message cannot be parsed or response message cannot be sent
private Message createTransportLayer(final CustomCommsNamespace ccommsMessage, final TerraHarvestMessage request,
        final RemoteChannel channel) throws IOException
    {
        final CreateTransportLayerRequestData createTransportLayer = CreateTransportLayerRequestData.
                parseFrom(ccommsMessage.getData());
        final String transportLayerType = createTransportLayer.getTransportLayerProductType();
        final String transportLayerName = createTransportLayer.getTransportLayerName();
        try
        {
            String linkLayerName = null;
            if (createTransportLayer.hasLinkLayerUuid()) 
            {
                final LinkLayer linkLayer = 
                        CustomCommUtility.getLinkLayerByUuid(m_CommsService, createTransportLayer.getLinkLayerUuid());
                linkLayerName = linkLayer.getName();
            }
            final TransportLayer createdTransportLayer = m_CommsService.createTransportLayer(transportLayerType,
                    transportLayerName, linkLayerName);
            final CreateTransportLayerResponseData response = CreateTransportLayerResponseData.newBuilder().
                    setInfo(SharedMessageUtils.createFactoryObjectInfoMessage(createdTransportLayer)).build();
            m_MessageFactory.createCustomCommsResponseMessage(request, 
                CustomCommsMessageType.CreateTransportLayerResponse, response).queue(channel);
        }
        catch (final CCommException e)
        {
            m_Logging.error(e, "CreateTransportLayer: Cannot create transport layer.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.CCOMM_ERROR, 
                    CUSTOM_COMMS_EXCEPTION + e.getMessage()).queue(channel);
        }
        return createTransportLayer;
    }
private Message createTransportLayer ( final CustomCommsNamespace ccommsMessage , final TerraHarvestMessage request , final RemoteChannel channel ) throws IOException { final CreateTransportLayerRequestData createTransportLayer = CreateTransportLayerRequestData . parseFrom ( ccommsMessage . getData ( ) ) ; final String transportLayerType = createTransportLayer . getTransportLayerProductType ( ) ; final String transportLayerName = createTransportLayer . getTransportLayerName ( ) ; try { String linkLayerName = null ; if ( createTransportLayer . hasLinkLayerUuid ( ) ) { final LinkLayer linkLayer = CustomCommUtility . getLinkLayerByUuid ( m_CommsService , createTransportLayer . getLinkLayerUuid ( ) ) ; linkLayerName = linkLayer . getName ( ) ; } final TransportLayer createdTransportLayer = m_CommsService . createTransportLayer ( transportLayerType , transportLayerName , linkLayerName ) ; final CreateTransportLayerResponseData response = CreateTransportLayerResponseData . newBuilder ( ) . setInfo ( SharedMessageUtils . createFactoryObjectInfoMessage ( createdTransportLayer ) ) . build ( ) ; m_MessageFactory . createCustomCommsResponseMessage ( request , CustomCommsMessageType . CreateTransportLayerResponse , response ) . queue ( channel ) ; } catch ( final CCommException e ) { m_Logging . error ( e , "CreateTransportLayer: Cannot create transport layer." ) ; m_MessageFactory . createBaseErrorMessage ( request , ErrorCode . CCOMM_ERROR , CUSTOM_COMMS_EXCEPTION + e . getMessage ( ) ) . queue ( channel ) ; } return createTransportLayer ; }
Method to create a new instance of a {@link TransportLayer} and add it to the
 service.
Method to create a new instance of a { @link TransportLayer } and add it to the service .