mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/RemoteChannelLookupImpl.java
private void addChannelToSet(final Set<RemoteChannel> channels, final RemoteChannel newChannel, final int systemId,
            final boolean persist)
    {
        channels.add(newChannel);

        // ignore server socket channels, they don't get persisted, must be accepted by socket server each time system
        // is started
        if (newChannel instanceof ServerSocketChannel)
        {
            return;
        }
        
        if (!m_Restoring && persist) // if channels are being added due to restoration, no need to persist
        {
            final SystemChannels systemChannels = translateToProto(channels, systemId);
            persistChannelData(systemChannels);
        }
        
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_SYS_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_CHANNEL, newChannel);
        
        final Event channelUpdated = new Event(TOPIC_CHANNEL_UPDATED, props);
        m_EventAdmin.postEvent(channelUpdated);
    }
/**
     * Add a new channel to the given set and optionally persists the channel set to the {@link PersistentDataStore}. 
     * {@link ServerSocketChannel} will not be persisted, only added to the set.
     * 
     * @param channels
     *      Set to add new channel to and persist
     * @param newChannel
     *      New channel to add and persist
     * @param systemId
     *      System id for the channel set
     * @param persist
     *      Boolean used to determine if the channel being added to the set should also be persisted.
     */
Add a new channel to the given set and optionally persists the channel set to the  PersistentDataStore.
ServerSocketChannel will not be persisted, only added to the set.

@param channels
Set to add new channel to and persist
@param newChannel
New channel to add and persist
@param systemId
System id for the channel set
@param persist
Boolean used to determine if the channel being added to the set should also be persisted.
Add a new channel to the given set and optionally persists the channel set to the PersistentDataStore . ServerSocketChannel will not be persisted only added to the set . @param channels Set to add new channel to and persist @param newChannel New channel to add and persist @param systemId System id for the channel set @param persist Boolean used to determine if the channel being added to the set should also be persisted .
private void addChannelToSet(final Set<RemoteChannel> channels, final RemoteChannel newChannel, final int systemId,
            final boolean persist)
    {
        channels.add(newChannel);
        if (newChannel instanceof ServerSocketChannel)
        {
            return;
        }
        if (!m_Restoring && persist) 
        {
            final SystemChannels systemChannels = translateToProto(channels, systemId);
            persistChannelData(systemChannels);
        }
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_SYS_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_CHANNEL, newChannel);
        final Event channelUpdated = new Event(TOPIC_CHANNEL_UPDATED, props);
        m_EventAdmin.postEvent(channelUpdated);
    }
private void addChannelToSet ( final Set < RemoteChannel > channels , final RemoteChannel newChannel , final int systemId , final boolean persist ) { channels . add ( newChannel ) ; if ( newChannel instanceof ServerSocketChannel ) { return ; } if ( ! m_Restoring && persist ) { final SystemChannels systemChannels = translateToProto ( channels , systemId ) ; persistChannelData ( systemChannels ) ; } final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_SYS_ID , systemId ) ; props . put ( RemoteConstants . EVENT_PROP_CHANNEL , newChannel ) ; final Event channelUpdated = new Event ( TOPIC_CHANNEL_UPDATED , props ) ; m_EventAdmin . postEvent ( channelUpdated ) ; }
Add a new channel to the given set and optionally persists the channel set to the {@link PersistentDataStore}.
Add a new channel to the given set and optionally persists the channel set to the { @link PersistentDataStore } .
// ignore server socket channels, they don't get persisted, must be accepted by socket server each time system // is started // if channels are being added due to restoration, no need to persist