example.message.router/src/example/message/router/ExampleMessageRouter.java
private void stopSocketListener()
    {        
        if (m_ServerSocket != null)
        {
            if (m_ClientMap != null)
            {
                for (long key : m_ClientMap.keySet())
                {
                    m_ClientMap.get(key).shutdown();
                }
            }

            m_ConnectionListener.shutdown();
            try
            {
                m_ServerSocket.close();
            }
            catch (final IOException ex)
            {
                m_Logger.error(ex, SHUTDOWN_ERROR);
            }
            
            try
            {
                m_ConnectionThread.join(TIMEOUT_MS);
            }
            catch (final InterruptedException ex)
            {
                m_Logger.debug("Connection thread interrupted while waiting to join.");
            }
            
            for (ComponentInstance instance: m_ComponentList)
            {
                instance.dispose();
            }
        }
    }
/**
     * Method that is called to stop the socket listener.
     */
Method that is called to stop the socket listener.
Method that is called to stop the socket listener .
private void stopSocketListener()
    {        
        if (m_ServerSocket != null)
        {
            if (m_ClientMap != null)
            {
                for (long key : m_ClientMap.keySet())
                {
                    m_ClientMap.get(key).shutdown();
                }
            }
            m_ConnectionListener.shutdown();
            try
            {
                m_ServerSocket.close();
            }
            catch (final IOException ex)
            {
                m_Logger.error(ex, SHUTDOWN_ERROR);
            }
            try
            {
                m_ConnectionThread.join(TIMEOUT_MS);
            }
            catch (final InterruptedException ex)
            {
                m_Logger.debug("Connection thread interrupted while waiting to join.");
            }
            for (ComponentInstance instance: m_ComponentList)
            {
                instance.dispose();
            }
        }
    }
private void stopSocketListener ( ) { if ( m_ServerSocket != null ) { if ( m_ClientMap != null ) { for ( long key : m_ClientMap . keySet ( ) ) { m_ClientMap . get ( key ) . shutdown ( ) ; } } m_ConnectionListener . shutdown ( ) ; try { m_ServerSocket . close ( ) ; } catch ( final IOException ex ) { m_Logger . error ( ex , SHUTDOWN_ERROR ) ; } try { m_ConnectionThread . join ( TIMEOUT_MS ) ; } catch ( final InterruptedException ex ) { m_Logger . debug ( "Connection thread interrupted while waiting to join." ) ; } for ( ComponentInstance instance : m_ComponentList ) { instance . dispose ( ) ; } } }
Method that is called to stop the socket listener.
Method that is called to stop the socket listener .