example.message.router/src/example/message/client/ExampleMessageClient.java
public void sendTestMessage(final long destId)
    {
        m_Logging.debug("Sending RequestControllerInfo message to remote controller at %s:%s", 
                m_Socket.getInetAddress(), m_Socket.getPort());
        final TerraHarvestMessage.Builder thmsgBuilder = TerraHarvestMessage.newBuilder();
        
        final TerraHarvestPayload.Builder payloadBuilder = TerraHarvestPayload.newBuilder();
        payloadBuilder.setNamespace(Namespace.Base);
        payloadBuilder.setNamespaceMessage(
                BaseNamespace.newBuilder()
                .setType(BaseNamespace.BaseMessageType.RequestControllerInfo)
                .build()
                .toByteString());
                
        thmsgBuilder.setDestId((int)destId);
        thmsgBuilder.setMessageId(m_SequenceId.getAndIncrement());
        thmsgBuilder.setSourceId((int)m_SystemId);
        thmsgBuilder.setVersion(RemoteConstants.SPEC_VERSION);
        thmsgBuilder.setTerraHarvestPayload(payloadBuilder.build().toByteString());
        
        final TerraHarvestMessage msg = thmsgBuilder.build();
        
        try
        {            
            msg.writeDelimitedTo(m_Socket.getOutputStream());
            m_Logging.debug(MESSAGE_SENT);
        }
        catch (final IOException ex)
        {
            m_Logging.error(ex, SEND_ERROR, 
                    BaseMessageType.RequestControllerInfo, m_Socket.getInetAddress(), m_Socket.getPort());
        }
        
    }
/**
     * Sends a request controller info message to the system with the specified ID.
     * 
     * @param destId
     *      ID of the system the get assets message should be sent to.
     */
Sends a request controller info message to the system with the specified ID.

@param destId
ID of the system the get assets message should be sent to.
Sends a request controller info message to the system with the specified ID . @param destId ID of the system the get assets message should be sent to .
public void sendTestMessage(final long destId)
    {
        m_Logging.debug("Sending RequestControllerInfo message to remote controller at %s:%s", 
                m_Socket.getInetAddress(), m_Socket.getPort());
        final TerraHarvestMessage.Builder thmsgBuilder = TerraHarvestMessage.newBuilder();
        final TerraHarvestPayload.Builder payloadBuilder = TerraHarvestPayload.newBuilder();
        payloadBuilder.setNamespace(Namespace.Base);
        payloadBuilder.setNamespaceMessage(
                BaseNamespace.newBuilder()
                .setType(BaseNamespace.BaseMessageType.RequestControllerInfo)
                .build()
                .toByteString());
        thmsgBuilder.setDestId((int)destId);
        thmsgBuilder.setMessageId(m_SequenceId.getAndIncrement());
        thmsgBuilder.setSourceId((int)m_SystemId);
        thmsgBuilder.setVersion(RemoteConstants.SPEC_VERSION);
        thmsgBuilder.setTerraHarvestPayload(payloadBuilder.build().toByteString());
        final TerraHarvestMessage msg = thmsgBuilder.build();
        try
        {            
            msg.writeDelimitedTo(m_Socket.getOutputStream());
            m_Logging.debug(MESSAGE_SENT);
        }
        catch (final IOException ex)
        {
            m_Logging.error(ex, SEND_ERROR, 
                    BaseMessageType.RequestControllerInfo, m_Socket.getInetAddress(), m_Socket.getPort());
        }
    }
public void sendTestMessage ( final long destId ) { m_Logging . debug ( "Sending RequestControllerInfo message to remote controller at %s:%s" , m_Socket . getInetAddress ( ) , m_Socket . getPort ( ) ) ; final TerraHarvestMessage . Builder thmsgBuilder = TerraHarvestMessage . newBuilder ( ) ; final TerraHarvestPayload . Builder payloadBuilder = TerraHarvestPayload . newBuilder ( ) ; payloadBuilder . setNamespace ( Namespace . Base ) ; payloadBuilder . setNamespaceMessage ( BaseNamespace . newBuilder ( ) . setType ( BaseNamespace . BaseMessageType . RequestControllerInfo ) . build ( ) . toByteString ( ) ) ; thmsgBuilder . setDestId ( ( int ) destId ) ; thmsgBuilder . setMessageId ( m_SequenceId . getAndIncrement ( ) ) ; thmsgBuilder . setSourceId ( ( int ) m_SystemId ) ; thmsgBuilder . setVersion ( RemoteConstants . SPEC_VERSION ) ; thmsgBuilder . setTerraHarvestPayload ( payloadBuilder . build ( ) . toByteString ( ) ) ; final TerraHarvestMessage msg = thmsgBuilder . build ( ) ; try { msg . writeDelimitedTo ( m_Socket . getOutputStream ( ) ) ; m_Logging . debug ( MESSAGE_SENT ) ; } catch ( final IOException ex ) { m_Logging . error ( ex , SEND_ERROR , BaseMessageType . RequestControllerInfo , m_Socket . getInetAddress ( ) , m_Socket . getPort ( ) ) ; } }
Sends a request controller info message to the system with the specified ID.
Sends a request controller info message to the system with the specified ID .