mil.dod.th.remote.client/src/mil/dod/th/remote/client/impl/Commands.java
@Descriptor("Disconnect from the controller")
    public void disconnect() throws IOException
    {
        m_MessageSenderService.removeRemoteChannel(CONTROLLER_ID);
        m_MessageListenerService.removeRemoteChannel(CONTROLLER_ID);

        if (!m_Socket.isClosed())
        {
            m_Socket.close();
        }

        if (m_AssetDirMessageCallback != null)
        {
            m_MessageListenerService.unregisterCallback(m_AssetDirMessageCallback);
            m_AssetDirMessageCallback = null; // NOPMD: Reference is no longer valid, so reset to null
        }
        
        if (m_DataStreamMessageCalback != null)
        {
            m_MessageListenerService.unregisterCallback(m_DataStreamMessageCalback);
            m_DataStreamMessageCalback = null; // NOPMD: Reference is no longer valid, so reset to null
        }

        if (m_EventHandlerReg != null)
        {
            m_EventHandlerReg.unregister();
            m_EventHandlerReg = null; // NOPMD: Reference is no longer valid, so reset to null
        }
    }
/**
     * Disconnect from the currently connected controller and remove streams from {@link MessageListenerService} and
     * {@link MessageSenderService}.
     * 
     * @throws IOException
     *      if error occurs when closing the socket
     */
Disconnect from the currently connected controller and remove streams from  MessageListenerService and
MessageSenderService.

@throws IOException
if error occurs when closing the socket
Disconnect from the currently connected controller and remove streams from MessageListenerService and MessageSenderService . @throws IOException if error occurs when closing the socket
@Descriptor("Disconnect from the controller")
    public void disconnect() throws IOException
    {
        m_MessageSenderService.removeRemoteChannel(CONTROLLER_ID);
        m_MessageListenerService.removeRemoteChannel(CONTROLLER_ID);
        if (!m_Socket.isClosed())
        {
            m_Socket.close();
        }
        if (m_AssetDirMessageCallback != null)
        {
            m_MessageListenerService.unregisterCallback(m_AssetDirMessageCallback);
            m_AssetDirMessageCallback = null; 
        }
        if (m_DataStreamMessageCalback != null)
        {
            m_MessageListenerService.unregisterCallback(m_DataStreamMessageCalback);
            m_DataStreamMessageCalback = null; 
        }
        if (m_EventHandlerReg != null)
        {
            m_EventHandlerReg.unregister();
            m_EventHandlerReg = null; 
        }
    }
@ Descriptor ( "Disconnect from the controller" ) public void disconnect ( ) throws IOException { m_MessageSenderService . removeRemoteChannel ( CONTROLLER_ID ) ; m_MessageListenerService . removeRemoteChannel ( CONTROLLER_ID ) ; if ( ! m_Socket . isClosed ( ) ) { m_Socket . close ( ) ; } if ( m_AssetDirMessageCallback != null ) { m_MessageListenerService . unregisterCallback ( m_AssetDirMessageCallback ) ; m_AssetDirMessageCallback = null ; } if ( m_DataStreamMessageCalback != null ) { m_MessageListenerService . unregisterCallback ( m_DataStreamMessageCalback ) ; m_DataStreamMessageCalback = null ; } if ( m_EventHandlerReg != null ) { m_EventHandlerReg . unregister ( ) ; m_EventHandlerReg = null ; } }
Disconnect from the currently connected controller and remove streams from {@link MessageListenerService} and
 {@link MessageSenderService}.
Disconnect from the currently connected controller and remove streams from { @link MessageListenerService } and { @link MessageSenderService } .
// NOPMD: Reference is no longer valid, so reset to null // NOPMD: Reference is no longer valid, so reset to null // NOPMD: Reference is no longer valid, so reset to null