example.message.router/src/example/message/client/ExampleMessageClient.java
public void sendGetAssetsMessage(final long destId)
    {
        m_Logging.debug("Sending GetAssetsRequest 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.AssetDirectoryService);
        payloadBuilder.setNamespaceMessage(
                AssetDirectoryServiceNamespace.newBuilder()
                .setType(AssetDirectoryServiceMessageType.GetAssetsRequest)
                .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,
                    AssetDirectoryServiceMessageType.GetAssetsRequest, m_Socket.getInetAddress(), m_Socket.getPort());
        }
    }
/**
     * Method that sends a get assets message to the system with the specified ID.
     * 
     * @param destId
     *      ID of the system the get assets message should be sent to.
     */
Method that sends a get assets message to the system with the specified ID.

@param destId
ID of the system the get assets message should be sent to.
Method that sends a get assets message to the system with the specified ID . @param destId ID of the system the get assets message should be sent to .
public void sendGetAssetsMessage(final long destId)
    {
        m_Logging.debug("Sending GetAssetsRequest 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.AssetDirectoryService);
        payloadBuilder.setNamespaceMessage(
                AssetDirectoryServiceNamespace.newBuilder()
                .setType(AssetDirectoryServiceMessageType.GetAssetsRequest)
                .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,
                    AssetDirectoryServiceMessageType.GetAssetsRequest, m_Socket.getInetAddress(), m_Socket.getPort());
        }
    }
public void sendGetAssetsMessage ( final long destId ) { m_Logging . debug ( "Sending GetAssetsRequest 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 . AssetDirectoryService ) ; payloadBuilder . setNamespaceMessage ( AssetDirectoryServiceNamespace . newBuilder ( ) . setType ( AssetDirectoryServiceMessageType . GetAssetsRequest ) . 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 , AssetDirectoryServiceMessageType . GetAssetsRequest , m_Socket . getInetAddress ( ) , m_Socket . getPort ( ) ) ; } }
Method that sends a get assets message to the system with the specified ID.
Method that sends a get assets message to the system with the specified ID .