mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/AssetNamespaceUtils.java
public static void deactivateAsset(Socket socket, SharedMessages.UUID uuid) throws IOException,
            InvalidProtocolBufferException
    {
        MessageListener listener = new MessageListener(socket);        
        
        int regId = RemoteEventRegistration.regRemoteEventMessages(socket, Asset.TOPIC_DEACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, 
                        SharedMessageUtils.convertProtoUUIDtoUUID(uuid).toString()));
        
        DeactivateRequestData request = DeactivateRequestData.newBuilder().
                setUuid(uuid).build(); 
        
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.DeactivateRequest, request);        
        message.writeDelimitedTo(socket.getOutputStream());
        
        try
        {
            listener.waitForMessages(TIMEOUT, 
                new BasicMessageMatcher(Namespace.Asset, 
                    AssetMessageType.DeactivateResponse), 
                new MessageMatchers.EventMessageMatcher(
                    Asset.TOPIC_DEACTIVATION_COMPLETE));
        }
        finally
        {
            MessageListener.unregisterEvent(regId, socket);
        }
    }
/**
     * Deactivate an asset with the given UUID, wait for the response.
     */
Deactivate an asset with the given UUID, wait for the response.
Deactivate an asset with the given UUID wait for the response .
public static void deactivateAsset(Socket socket, SharedMessages.UUID uuid) throws IOException,
            InvalidProtocolBufferException
    {
        MessageListener listener = new MessageListener(socket);        
        int regId = RemoteEventRegistration.regRemoteEventMessages(socket, Asset.TOPIC_DEACTIVATION_COMPLETE, 
                String.format("(%s=%s)", FactoryDescriptor.EVENT_PROP_OBJ_UUID, 
                        SharedMessageUtils.convertProtoUUIDtoUUID(uuid).toString()));
        DeactivateRequestData request = DeactivateRequestData.newBuilder().
                setUuid(uuid).build(); 
        TerraHarvestMessage message = AssetNamespaceUtils.createAssetMessage(
                AssetMessageType.DeactivateRequest, request);        
        message.writeDelimitedTo(socket.getOutputStream());
        try
        {
            listener.waitForMessages(TIMEOUT, 
                new BasicMessageMatcher(Namespace.Asset, 
                    AssetMessageType.DeactivateResponse), 
                new MessageMatchers.EventMessageMatcher(
                    Asset.TOPIC_DEACTIVATION_COMPLETE));
        }
        finally
        {
            MessageListener.unregisterEvent(regId, socket);
        }
    }
public static void deactivateAsset ( Socket socket , SharedMessages . UUID uuid ) throws IOException , InvalidProtocolBufferException { MessageListener listener = new MessageListener ( socket ) ; int regId = RemoteEventRegistration . regRemoteEventMessages ( socket , Asset . TOPIC_DEACTIVATION_COMPLETE , String . format ( "(%s=%s)" , FactoryDescriptor . EVENT_PROP_OBJ_UUID , SharedMessageUtils . convertProtoUUIDtoUUID ( uuid ) . toString ( ) ) ) ; DeactivateRequestData request = DeactivateRequestData . newBuilder ( ) . setUuid ( uuid ) . build ( ) ; TerraHarvestMessage message = AssetNamespaceUtils . createAssetMessage ( AssetMessageType . DeactivateRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; try { listener . waitForMessages ( TIMEOUT , new BasicMessageMatcher ( Namespace . Asset , AssetMessageType . DeactivateResponse ) , new MessageMatchers . EventMessageMatcher ( Asset . TOPIC_DEACTIVATION_COMPLETE ) ) ; } finally { MessageListener . unregisterEvent ( regId , socket ) ; } }
Deactivate an asset with the given UUID, wait for the response.
Deactivate an asset with the given UUID wait for the response .