Java Code Examples for org.apache.mina.core.session.AbstractIoSession#notifyIdleness()

The following examples show how to use org.apache.mina.core.session.AbstractIoSession#notifyIdleness() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractPollingConnectionlessIoAcceptor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
private void notifyIdleSessions( long currentTime )
{
    // process idle sessions
    if ( currentTime - lastIdleCheckTime >= 1000 )
    {
        lastIdleCheckTime = currentTime;
        AbstractIoSession.notifyIdleness( getListeners().getManagedSessions().values().iterator(), currentTime );
    }
}
 
Example 2
Source File: AbstractPollingIoProcessor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
private void notifyIdleSessions(long currentTime) throws Exception {
    // process idle sessions
    if (currentTime - lastIdleCheckTime >= SELECT_TIMEOUT) {
        lastIdleCheckTime = currentTime;
        AbstractIoSession.notifyIdleness(allSessions(), currentTime);
    }
}