Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
NicknameNegotiationHook (Preferences preferences, SessionNegotiationHookManager hooks, ISarosSessionManager sessionManager) | |
Map< String, String > | tellClientPreferences () |
Map< String, String > | considerClientPreferences (final JID client, final Map< String, String > input) |
void | applyActualParameters (Map< String, String > settings) |
String | getIdentifier () |
Static Public Attributes | |
static final String | KEY_CLIENT_NICKNAME = "clientNickname" |
static final String | KEY_HOST_NICKNAME = "hostNickname" |
de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.NicknameNegotiationHook | ( | Preferences | preferences, |
SessionNegotiationHookManager | hooks, | ||
ISarosSessionManager | sessionManager | ||
) |
void de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.applyActualParameters | ( | Map< String, String > | settings | ) |
Duty of the client: Apply the parameters defined by the host.
This method will be called on the client's side upon reception of the actual session parameters determined by the host. The hook itself is responsible for accessing and modifying the according components (e.g. the SarosSessionManager). This method will be called right before the Session is created on the client side (via SarosSessionManager.joinSession()
) and may not rely on the effects of other hooks.
settings | The parameters concerning the hook at hand, which were determined by the host during his OutgoingSessionNegotiation (i.e. the return value of considerClientPreferences(JID, Map) ). Might be null , if the host has no counterpart for this hook. |
Implements de.fu_berlin.inf.dpp.negotiation.hooks.ISessionNegotiationHook.
Map<String, String> de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.considerClientPreferences | ( | final JID | client, |
final Map< String, String > | input | ||
) |
String de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.getIdentifier | ( | ) |
Retrieves the hook's identifier.
The identifier is used to match the two parts of the hook (on client and host side). Therefore, changing the identifier of a hook breaks the compatibility with older Saros versions.
Implements de.fu_berlin.inf.dpp.negotiation.hooks.ISessionNegotiationHook.
Map<String, String> de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.tellClientPreferences | ( | ) |
Receive the client's preferences for later consideration.
During the invitation this method will be called on the client side (see IncomingSessionNegotiation). The client may use this opportunity to tell the host (inviter) his preferences concerning the session parameters.
null
, the settings won't be transferred to the host. Implements de.fu_berlin.inf.dpp.negotiation.hooks.ISessionNegotiationHook.
final String de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.KEY_CLIENT_NICKNAME = "clientNickname" [static] |
final String de.fu_berlin.inf.dpp.session.NicknameNegotiationHook.KEY_HOST_NICKNAME = "hostNickname" [static] |