mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/AbstractSocketChannel.java
public void subActivate(final Socket socket, final Map<String, Object> matchProps)
    {
        m_Socket = socket;

        m_WakeLock = m_PowerManager.createWakeLock(getClass(),
                String.format("remoteSocket:%s", m_Socket.getRemoteSocketAddress()));

        if (m_RemoteSettings.isPreventSleepModeEnabled())
        {
            m_WakeLock.activate();
        }

        m_Logging.info("Activated remote channel for socket (%s)", m_Socket.getRemoteSocketAddress());

        initMessageSender(matchProps);

        //assign initial channel status
        m_Status = ChannelStatus.Unknown;
        
        // create message listener for this channel and run it on a thread
        final Dictionary<String, Object> listenerProps = new Hashtable<String, Object>();
        listenerProps.put(SocketMessageListener.SOCKET_PROP_KEY, m_Socket);
        listenerProps.put(SocketMessageListener.CHANNEL_PROP_KEY, this);
        m_ListenerInstance = m_SocketMessageListenerFactory.newInstance(listenerProps);
        
        // now that sending is setup through subclass, start listener
        final SocketMessageListener listener = (SocketMessageListener)m_ListenerInstance.getInstance();
        m_ListenerThread = new Thread(listener);
        m_ListenerThread.setName(m_Socket.getRemoteSocketAddress() + "-MessageListener");
        m_ListenerThread.start();
    }
/**
     * Activate the component by getting a reference to the connected socket.
     *
     * @param socket
     *      socket used by this channel to send/receive data
     * @param matchProps
     *      properties of the component that will be used by {@link #matches(Map)} (exclude others)
     */
Activate the component by getting a reference to the connected socket.
@param socket
socket used by this channel to send/receive data
@param matchProps
properties of the component that will be used by  #matches(Map) (exclude others)
Activate the component by getting a reference to the connected socket . @param socket socket used by this channel to send / receive data @param matchProps properties of the component that will be used by #matches ( Map ) ( exclude others )
public void subActivate(final Socket socket, final Map<String, Object> matchProps)
    {
        m_Socket = socket;
        m_WakeLock = m_PowerManager.createWakeLock(getClass(),
                String.format("remoteSocket:%s", m_Socket.getRemoteSocketAddress()));
        if (m_RemoteSettings.isPreventSleepModeEnabled())
        {
            m_WakeLock.activate();
        }
        m_Logging.info("Activated remote channel for socket (%s)", m_Socket.getRemoteSocketAddress());
        initMessageSender(matchProps);
        m_Status = ChannelStatus.Unknown;
        final Dictionary<String, Object> listenerProps = new Hashtable<String, Object>();
        listenerProps.put(SocketMessageListener.SOCKET_PROP_KEY, m_Socket);
        listenerProps.put(SocketMessageListener.CHANNEL_PROP_KEY, this);
        m_ListenerInstance = m_SocketMessageListenerFactory.newInstance(listenerProps);
        final SocketMessageListener listener = (SocketMessageListener)m_ListenerInstance.getInstance();
        m_ListenerThread = new Thread(listener);
        m_ListenerThread.setName(m_Socket.getRemoteSocketAddress() + "-MessageListener");
        m_ListenerThread.start();
    }
public void subActivate ( final Socket socket , final Map < String , Object > matchProps ) { m_Socket = socket ; m_WakeLock = m_PowerManager . createWakeLock ( getClass ( ) , String . format ( "remoteSocket:%s" , m_Socket . getRemoteSocketAddress ( ) ) ) ; if ( m_RemoteSettings . isPreventSleepModeEnabled ( ) ) { m_WakeLock . activate ( ) ; } m_Logging . info ( "Activated remote channel for socket (%s)" , m_Socket . getRemoteSocketAddress ( ) ) ; initMessageSender ( matchProps ) ; m_Status = ChannelStatus . Unknown ; final Dictionary < String , Object > listenerProps = new Hashtable < String , Object > ( ) ; listenerProps . put ( SocketMessageListener . SOCKET_PROP_KEY , m_Socket ) ; listenerProps . put ( SocketMessageListener . CHANNEL_PROP_KEY , this ) ; m_ListenerInstance = m_SocketMessageListenerFactory . newInstance ( listenerProps ) ; final SocketMessageListener listener = ( SocketMessageListener ) m_ListenerInstance . getInstance ( ) ; m_ListenerThread = new Thread ( listener ) ; m_ListenerThread . setName ( m_Socket . getRemoteSocketAddress ( ) + "-MessageListener" ) ; m_ListenerThread . start ( ) ; }
Activate the component by getting a reference to the connected socket.
Activate the component by getting a reference to the connected socket .
//assign initial channel status // create message listener for this channel and run it on a thread // now that sending is setup through subclass, start listener