Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler:
de.fu_berlin.inf.dpp.project.internal.timeout.ClientSessionTimeoutHandler de.fu_berlin.inf.dpp.project.internal.timeout.ServerSessionTimeoutHandler

List of all members.

Public Member Functions

void start ()
void stop ()

Protected Member Functions

 SessionTimeoutHandler (ISarosSession session, ISarosSessionManager sessionManager, ActivitySequencer sequencer, ITransmitter transmitter, IReceiver receiver)
final void handleNetworkError (final JID jid, final String reason)

Protected Attributes

final ISarosSession session
final ISarosSessionManager sessionManager
final ITransmitter transmitter
final IReceiver receiver
final String currentSessionID

Static Protected Attributes

static final long TIMEOUT = 10000L
static final long PING_PONG_TIMEOUT
static final long PING_PONG_UPDATE_DELAY

Detailed Description

Abstract base class that is already capable of detecting and handling network errors occurred in the ActivitySequencer component.

Author:
srossbach

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler.SessionTimeoutHandler ( ISarosSession  session,
ISarosSessionManager  sessionManager,
ActivitySequencer  sequencer,
ITransmitter  transmitter,
IReceiver  receiver 
) [protected]

Member Function Documentation

final void de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler.handleNetworkError ( final JID  jid,
final String  reason 
) [protected]

Handles a network error by either stopping the session or removing the user from the session depending on the state of the local user. This method returns immediately and performs its work in the background.

Parameters:
jidthe JID} of the user
reasona reason why a network error occurred
void de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler.start ( )
void de.fu_berlin.inf.dpp.project.internal.timeout.SessionTimeoutHandler.stop ( )

Member Data Documentation

Initial value:
 Long.getLong(
        "de.fu_berlin.inf.dpp.session.timeout.PING_PONG_TIMEOUT",
        60L * 1000L * 5L)

Total timeout in milliseconds to remove a user(host) or stop the session(client) if no ping or pong packet is received.

Initial value:
 Long.getLong(
        "de.fu_berlin.inf.dpp.session.timeout.PING_PONG_UPDATE_DELAY", 30000L)

Update interval for sending and / or checking the status of ping and pong packets.

Current session the component is run with.

Join timeout when stopping this component

 All Classes Namespaces Files Functions Variables Enumerations