example.message.router/src/example/message/client/ExampleMessageClient.java
public void sendCreateAssetMessage(final long destId)
    {
        final CreateAssetRequestData createAsset = CreateAssetRequestData.newBuilder()
                .setProductType("example.asset.ExampleAsset")
                .setName("TestAsset").build();
        final AssetDirectoryServiceNamespace namespace = AssetDirectoryServiceNamespace.newBuilder().setType(
                AssetDirectoryServiceMessageType.CreateAssetRequest).setData(createAsset.toByteString()).build();
        final TerraHarvestPayload payload = TerraHarvestPayload.newBuilder()
                .setNamespace(Namespace.AssetDirectoryService)
                .setNamespaceMessage(namespace.toByteString()).build();
        final TerraHarvestMessage thMessage = TerraHarvestMessage.newBuilder()
                .setDestId((int)destId)
                .setSourceId((int)m_SystemId)
                .setMessageId(m_SequenceId.getAndIncrement()).setTerraHarvestPayload(payload.toByteString())
                .setVersion(RemoteConstants.SPEC_VERSION).build();
        
        try
        {
            thMessage.writeDelimitedTo(m_Socket.getOutputStream());
            m_Logging.debug(MESSAGE_SENT);
        }
        catch (final IOException ex)
        {
            m_Logging.error(ex, SEND_ERROR,
                    AssetDirectoryServiceMessageType.CreateAssetRequest, m_Socket.getInetAddress(), m_Socket.getPort());
        }        
    }
/**
     * Method that sends a create asset message to the system with the specified ID. This method assumes that the 
     * receiving system has the example.asset.ExampleAsset factory available.
     * 
     * @param destId
     *      ID of the system the create asset message should be sent to.
     */
Method that sends a create asset message to the system with the specified ID. This method assumes that the
receiving system has the example.asset.ExampleAsset factory available.

@param destId
ID of the system the create asset message should be sent to.
Method that sends a create asset message to the system with the specified ID . This method assumes that the receiving system has the example . asset . ExampleAsset factory available . @param destId ID of the system the create asset message should be sent to .
public void sendCreateAssetMessage(final long destId)
    {
        final CreateAssetRequestData createAsset = CreateAssetRequestData.newBuilder()
                .setProductType("example.asset.ExampleAsset")
                .setName("TestAsset").build();
        final AssetDirectoryServiceNamespace namespace = AssetDirectoryServiceNamespace.newBuilder().setType(
                AssetDirectoryServiceMessageType.CreateAssetRequest).setData(createAsset.toByteString()).build();
        final TerraHarvestPayload payload = TerraHarvestPayload.newBuilder()
                .setNamespace(Namespace.AssetDirectoryService)
                .setNamespaceMessage(namespace.toByteString()).build();
        final TerraHarvestMessage thMessage = TerraHarvestMessage.newBuilder()
                .setDestId((int)destId)
                .setSourceId((int)m_SystemId)
                .setMessageId(m_SequenceId.getAndIncrement()).setTerraHarvestPayload(payload.toByteString())
                .setVersion(RemoteConstants.SPEC_VERSION).build();
        try
        {
            thMessage.writeDelimitedTo(m_Socket.getOutputStream());
            m_Logging.debug(MESSAGE_SENT);
        }
        catch (final IOException ex)
        {
            m_Logging.error(ex, SEND_ERROR,
                    AssetDirectoryServiceMessageType.CreateAssetRequest, m_Socket.getInetAddress(), m_Socket.getPort());
        }        
    }
public void sendCreateAssetMessage ( final long destId ) { final CreateAssetRequestData createAsset = CreateAssetRequestData . newBuilder ( ) . setProductType ( "example.asset.ExampleAsset" ) . setName ( "TestAsset" ) . build ( ) ; final AssetDirectoryServiceNamespace namespace = AssetDirectoryServiceNamespace . newBuilder ( ) . setType ( AssetDirectoryServiceMessageType . CreateAssetRequest ) . setData ( createAsset . toByteString ( ) ) . build ( ) ; final TerraHarvestPayload payload = TerraHarvestPayload . newBuilder ( ) . setNamespace ( Namespace . AssetDirectoryService ) . setNamespaceMessage ( namespace . toByteString ( ) ) . build ( ) ; final TerraHarvestMessage thMessage = TerraHarvestMessage . newBuilder ( ) . setDestId ( ( int ) destId ) . setSourceId ( ( int ) m_SystemId ) . setMessageId ( m_SequenceId . getAndIncrement ( ) ) . setTerraHarvestPayload ( payload . toByteString ( ) ) . setVersion ( RemoteConstants . SPEC_VERSION ) . build ( ) ; try { thMessage . writeDelimitedTo ( m_Socket . getOutputStream ( ) ) ; m_Logging . debug ( MESSAGE_SENT ) ; } catch ( final IOException ex ) { m_Logging . error ( ex , SEND_ERROR , AssetDirectoryServiceMessageType . CreateAssetRequest , m_Socket . getInetAddress ( ) , m_Socket . getPort ( ) ) ; } }
Method that sends a create asset message to the system with the specified ID.
Method that sends a create asset message to the system with the specified ID .