com.threerings.crowd.chat.client
Class ChatDirector

java.lang.Object
  extended by com.threerings.presents.client.BasicDirector
      extended by com.threerings.crowd.chat.client.ChatDirector
All Implemented Interfaces:
ChatCodes, LocationObserver, SessionObserver, InvocationCodes, ChangeListener, MessageListener

public class ChatDirector
extends BasicDirector
implements ChatCodes, LocationObserver, MessageListener

The chat director is the client side coordinator of all chat related services. It handles both place constrained chat as well as direct messaging.


Nested Class Summary
protected  class ChatDirector.BroadcastHandler
          Implements /broadcast.
static interface ChatDirector.ChatterObserver
          An interface to receive information about the MAX_CHATTERS most recent users that we've been chatting with.
static interface ChatDirector.ChatterValidator
          An interface for those who would like to validate whether usernames may be added to the chatter list.
protected  class ChatDirector.ClearHandler
          Implements /clear.
static class ChatDirector.CommandHandler
          Used to implement a slash command (e.g.
protected static class ChatDirector.DisplayMessageOp
          An observer op used to dispatch ChatMessages on the client.
protected  class ChatDirector.EmoteHandler
          Implements /emote.
protected static class ChatDirector.FilterMessageOp
          An operation that checks with all chat filters to properly filter a message prior to sending to the server or displaying.
protected  class ChatDirector.HelpHandler
          Implements /help.
protected  class ChatDirector.SpeakHandler
          Implements /speak.
protected  class ChatDirector.TellHandler
          Implements /tell.
protected  class ChatDirector.ThinkHandler
          Implements /think.
 
Field Summary
protected  com.samskivert.util.HashIntMap<String> _auxes
          A mapping from auxiliary chat objects to the types under which they are registered.
protected  String _bundle
          The bundle to use for our own internal messages.
protected  com.samskivert.util.ObserverList<ChatDirector.ChatterObserver> _chatterObservers
          Observers that are watching our chatters list.
protected  LinkedList<Name> _chatters
          Usernames of users we've recently chatted with.
protected  ChatDirector.ChatterValidator _chatterValidator
          Validator of who may be added to the chatters list.
protected  ClientObject _clobj
          The client object that we're listening to for tells.
protected  ChatService _cservice
          Provides access to chat-related server-side services.
protected  CrowdContext _ctx
          Our active chat context.
protected  ChatDirector.DisplayMessageOp _displayMessageOp
          Operation used to display chat messages.
protected  com.samskivert.util.ObserverList<ChatDisplay> _displays
          A list of registered chat displays.
protected  ChatDirector.FilterMessageOp _filterMessageOp
          Operation used to filter chat messages.
protected  com.samskivert.util.ObserverList<ChatFilter> _filters
          A list of registered chat filters.
protected static HashMap<String,ChatDirector.CommandHandler> _handlers
          Registered chat command handlers.
protected static ArrayList<String> _history
          A history of chat commands.
protected  boolean _mogrifyChat
          Whether or not to run chat through the mogrifier.
protected  MessageManager _msgmgr
          The message manager.
protected  PlaceObject _place
          The place object that we currently occupy.
protected static int MAX_CHATTERS
          The maximum number of chatter usernames to track.
protected static int MAX_COMMAND_HISTORY
          The maximum number of commands to keep in the chat history.
 
Fields inherited from class com.threerings.presents.client.BasicDirector
_availableInStandalone
 
Fields inherited from interface com.threerings.crowd.chat.data.ChatCodes
BROADCAST_ACCESS, BROADCAST_MODE, CHAT_ACCESS, CHAT_CHANNEL_NOTIFICATION, CHAT_NOTIFICATION, DEFAULT_IDLE_TIME, DEFAULT_MODE, EMOTE_MODE, IDLE_TIME_KEY, LAST_MODE, PLACE_CHAT_TYPE, SHOUT_MODE, SUCCESS, THINK_MODE, USER_CHAT_TYPE, USER_DISCONNECTED, USER_NOT_ONLINE, XLATE_MODES
 
Fields inherited from interface com.threerings.presents.data.InvocationCodes
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR
 
Constructor Summary
ChatDirector(CrowdContext ctx, MessageManager msgmgr, String bundle)
          Creates a chat director and initializes it with the supplied context.
 
Method Summary
 void addAuxiliarySource(DObject source, String localtype)
          Adds an additional object via which chat messages may arrive.
 boolean addChatDisplay(ChatDisplay display)
          Adds the supplied chat display to the end of the chat display list.
 boolean addChatFilter(ChatFilter filter)
          Adds the specified chat filter to the list of filters.
protected  void addChatter(Name name)
          Adds a chatter to our list of recent chatters.
 boolean addChatterObserver(ChatDirector.ChatterObserver co)
          Adds an observer that watches the chatters list, and updates it immediately.
protected  void addToHistory(String cmd)
          Adds the specified command to the history.
protected  String checkCanChat(SpeakService speakSvc, String message, byte mode)
          Called to determine whether we are permitted to post the supplied chat message.
protected  String checkLength(String msg)
          Check that after mogrification the message is not too long.
 void clearCommandHistory()
          Clear the chat command history.
 void clearDisplays()
          Requests that all chat displays clear their contents.
 void clientDidLogoff(Client client)
          Called after the client has been logged off of the server and has disconnected.
 void clientDidLogon(Client client)
          Called after the client successfully connected to and authenticated with the server.
 void clientObjectDidChange(Client client)
          For systems that allow switching screen names after logon, this method is called whenever a screen name change takes place to report that the client object has been replaced to potential client-side subscribers.
protected  String deliverChat(SpeakService speakSvc, String message, byte mode)
          Delivers a plain chat message (not a slash command) on the specified speak service in the specified mode.
 void dispatchMessage(ChatMessage message, String localType)
          Dispatches the provided message to our chat displays.
protected  void dispatchPreparedMessage(ChatMessage message)
          Dispatch a message to chat displays once it is fully prepared with the clientinfo.
 void displayAttention(String bundle, String message)
          Display a system ATTENTION message as if it had come from the server.
 void displayFeedback(String bundle, String message)
          Display a system FEEDBACK message as if it had come from the server.
 void displayInfo(String bundle, String message)
          Display a system INFO message as if it had come from the server.
 void displayInfo(String bundle, String message, String localtype)
          Display a system INFO message as if it had come from the server.
protected  void displaySystem(String bundle, String message, byte attLevel, String localtype)
          Display the specified system message as if it had come from the server.
protected  void fetchServices(Client client)
          Derived directors can override this method and obtain any services they'll need during their operation via calls to Client.getService(java.lang.Class).
 String filter(String msg, Name otherUser, boolean outgoing)
          Run a message through all the currently registered filters.
protected  Map<String,ChatDirector.CommandHandler> getCommandHandlers(String command)
          Returns a map containing all command handlers that match the specified command (i.e. the specified command is a prefix of their registered command string).
 String getCommandHistory(int index)
          Get the chat history entry at the specified index, with 0 being the oldest.
 int getCommandHistorySize()
          Return the current size of the history.
protected  String getLocalType(int oid)
          Looks up and returns the message type associated with the specified oid.
protected  boolean isCommandPrefix(String enteredCommand, String handlerCommand, ChatDirector.CommandHandler handler, BodyObject user)
          Returns true if enteredCommand equals or is a prefix of handlerCommand and if the handler is available for user.
 void locationChangeFailed(int placeId, String reason)
          This is called on all location observers when a location change request is rejected by the server or fails for some other reason.
 void locationDidChange(PlaceObject place)
          Called when we have switched to a new location.
 boolean locationMayChange(int placeId)
          Called when someone has requested that we switch to a new location.
 void messageReceived(MessageEvent event)
          Called when an message event has been dispatched on an object.
 String mogrifyChat(String text)
          Runs the supplied message through the various chat mogrifications.
protected  String mogrifyChat(String text, boolean transformsAllowed, boolean capFirst)
          Mogrifies common literary crutches into more appealing chat or commands.
protected  StringBuffer mogrifyChat(StringBuffer buf, boolean transformsAllowed, boolean capFirst)
          Helper function for mogrifyChat(String,boolean,boolean).
protected  void notifyChatterObservers()
          Notifies all registered ChatDirector.ChatterObservers that the list of chatters has changed.
protected  void processReceivedMessage(ChatMessage msg, String localtype)
          Processes and dispatches the specified chat message.
 void pushChatDisplay(ChatDisplay display)
          Adds the supplied chat display to the front of the chat display list.
 void registerCommandHandler(MessageBundle msg, String command, ChatDirector.CommandHandler handler)
          Registers a chat command handler.
protected  void registerCommandHandlers()
          Registers all the chat-command handlers.
protected  void registerServices(Client client)
          If a director makes use of bootstrap invocation services which are part of a bootstrap service group, it should register interest in that group here with a call to Client.addServiceGroup(java.lang.String).
 void removeAuxiliarySource(DObject source)
          Removes a previously added auxiliary chat source.
 boolean removeChatDisplay(ChatDisplay display)
          Removes the specified chat display from the chat display list.
 boolean removeChatFilter(ChatFilter filter)
          Removes the specified chat filter from the list of chat filter.
 boolean removeChatterObserver(ChatDirector.ChatterObserver co)
          Removes an observer from the list of chatter observers.
 void requestBroadcast(String message)
          Requests to send a site-wide broadcast message.
 String requestChat(SpeakService speakSvc, String text, boolean record)
          Parses and delivers the supplied chat message.
 void requestSpeak(SpeakService speakService, String message, byte mode)
          Requests that a speak message with the specified mode be generated and delivered via the supplied speak service instance (which will be associated with a particular "speak object").
<T extends Name>
void
requestTell(T target, String msg, com.samskivert.util.ResultListener<T> rl)
          Requests that a tell message be delivered to the specified target user.
 void setAwayMessage(String message)
          Configures a message that will be automatically reported to anyone that sends a tell message to this client to indicate that we are busy or away from the keyboard.
 void setChatterValidator(ChatDirector.ChatterValidator validator)
          Sets the validator that decides if a username is valid to be added to the chatter list, or null if no such filtering is desired.
protected  void setClientInfo(ChatMessage msg, String localType)
          Set the "client info" on the specified message, if not already set.
 void setMogrifyChat(boolean mogrifyChat)
          Enables or disables the chat mogrifier.
protected  boolean suppressTooManyCaps()
          Return true if we should lowercase messages containing more than half upper-case characters.
protected  StringBuffer translatedReplacements(String key, StringBuffer buf)
          Do all the replacements (mogrifications) specified in the translation string specified by the key.
protected  String xlate(String bundle, String message)
          Translates the specified message using the specified bundle.
 
Methods inherited from class com.threerings.presents.client.BasicDirector
assertAvailable, clientObjectUpdated, clientWillLogon, isAvailable, isAvailableInStandalone, setAvailableInStandalone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected CrowdContext _ctx
Our active chat context.


_cservice

protected ChatService _cservice
Provides access to chat-related server-side services.


_msgmgr

protected MessageManager _msgmgr
The message manager.


_bundle

protected String _bundle
The bundle to use for our own internal messages.


_place

protected PlaceObject _place
The place object that we currently occupy.


_clobj

protected ClientObject _clobj
The client object that we're listening to for tells.


_mogrifyChat

protected boolean _mogrifyChat
Whether or not to run chat through the mogrifier.


_displays

protected com.samskivert.util.ObserverList<ChatDisplay> _displays
A list of registered chat displays.


_filters

protected com.samskivert.util.ObserverList<ChatFilter> _filters
A list of registered chat filters.


_auxes

protected com.samskivert.util.HashIntMap<String> _auxes
A mapping from auxiliary chat objects to the types under which they are registered.


_chatterValidator

protected ChatDirector.ChatterValidator _chatterValidator
Validator of who may be added to the chatters list.


_chatters

protected LinkedList<Name> _chatters
Usernames of users we've recently chatted with.


_chatterObservers

protected com.samskivert.util.ObserverList<ChatDirector.ChatterObserver> _chatterObservers
Observers that are watching our chatters list.


_filterMessageOp

protected ChatDirector.FilterMessageOp _filterMessageOp
Operation used to filter chat messages.


_displayMessageOp

protected ChatDirector.DisplayMessageOp _displayMessageOp
Operation used to display chat messages.


_handlers

protected static HashMap<String,ChatDirector.CommandHandler> _handlers
Registered chat command handlers.


_history

protected static ArrayList<String> _history
A history of chat commands.


MAX_CHATTERS

protected static final int MAX_CHATTERS
The maximum number of chatter usernames to track.

See Also:
Constant Field Values

MAX_COMMAND_HISTORY

protected static final int MAX_COMMAND_HISTORY
The maximum number of commands to keep in the chat history.

See Also:
Constant Field Values
Constructor Detail

ChatDirector

public ChatDirector(CrowdContext ctx,
                    MessageManager msgmgr,
                    String bundle)
Creates a chat director and initializes it with the supplied context. The chat director will register itself as a location observer so that it can automatically process place constrained chat.

Parameters:
msgmgr - the message manager via which we do our translations.
bundle - the message bundle from which we obtain our chat-related translation strings.
Method Detail

registerCommandHandlers

protected void registerCommandHandlers()
Registers all the chat-command handlers.


pushChatDisplay

public void pushChatDisplay(ChatDisplay display)
Adds the supplied chat display to the front of the chat display list. It will subsequently be notified of incoming chat messages as well as tell responses.


addChatDisplay

public boolean addChatDisplay(ChatDisplay display)
Adds the supplied chat display to the end of the chat display list. It will subsequently be notified of incoming chat messages as well as tell responses.


removeChatDisplay

public boolean removeChatDisplay(ChatDisplay display)
Removes the specified chat display from the chat display list. The display will no longer receive chat related notifications.


addChatFilter

public boolean addChatFilter(ChatFilter filter)
Adds the specified chat filter to the list of filters. All chat requests and receipts will be filtered with all filters before they being sent or dispatched locally.


removeChatFilter

public boolean removeChatFilter(ChatFilter filter)
Removes the specified chat filter from the list of chat filter.


addChatterObserver

public boolean addChatterObserver(ChatDirector.ChatterObserver co)
Adds an observer that watches the chatters list, and updates it immediately.


removeChatterObserver

public boolean removeChatterObserver(ChatDirector.ChatterObserver co)
Removes an observer from the list of chatter observers.


setChatterValidator

public void setChatterValidator(ChatDirector.ChatterValidator validator)
Sets the validator that decides if a username is valid to be added to the chatter list, or null if no such filtering is desired.


setMogrifyChat

public void setMogrifyChat(boolean mogrifyChat)
Enables or disables the chat mogrifier. The mogrifier converts chat speak like LOL, WTF, etc. into phrases, words and can also transform them into emotes. The mogrifier is configured via the x.mogrifies and x.transforms translation properties.


registerCommandHandler

public void registerCommandHandler(MessageBundle msg,
                                   String command,
                                   ChatDirector.CommandHandler handler)
Registers a chat command handler.

Parameters:
msg - the message bundle via which the slash command will be translated (as c.command). If no translation exists the command will be /command.
command - the name of the command that will be used to invoke this handler (e.g. tell if the command will be invoked as /tell).
handler - the chat command handler itself.

getCommandHistorySize

public int getCommandHistorySize()
Return the current size of the history.


getCommandHistory

public String getCommandHistory(int index)
Get the chat history entry at the specified index, with 0 being the oldest.


clearCommandHistory

public void clearCommandHistory()
Clear the chat command history.


clearDisplays

public void clearDisplays()
Requests that all chat displays clear their contents.


displayInfo

public void displayInfo(String bundle,
                        String message)
Display a system INFO message as if it had come from the server. The localtype of the message will be PLACE_CHAT_TYPE. Info messages are sent when something happens that was neither directly triggered by the user, nor requires direct action.


displayInfo

public void displayInfo(String bundle,
                        String message,
                        String localtype)
Display a system INFO message as if it had come from the server. Info messages are sent when something happens that was neither directly triggered by the user, nor requires direct action.


displayFeedback

public void displayFeedback(String bundle,
                            String message)
Display a system FEEDBACK message as if it had come from the server. The localtype of the message will be PLACE_CHAT_TYPE. Feedback messages are sent in direct response to a user action, usually to indicate success or failure of the user's action.


displayAttention

public void displayAttention(String bundle,
                             String message)
Display a system ATTENTION message as if it had come from the server. The localtype of the message will be PLACE_CHAT_TYPE. Attention messages are sent when something requires user action that did not result from direct action by the user.


dispatchMessage

public void dispatchMessage(ChatMessage message,
                            String localType)
Dispatches the provided message to our chat displays.


requestChat

public String requestChat(SpeakService speakSvc,
                          String text,
                          boolean record)
Parses and delivers the supplied chat message. Slash command processing and mogrification are performed and the message is added to the chat history if appropriate.

Parameters:
speakSvc - the SpeakService representing the target dobj of the speak or null if we should speak in the "default" way.
text - the text to be parsed and sent.
record - if text is a command, should it be added to the history?
Returns:
ChatCodes#SUCCESS if the message was parsed and sent correctly, a translatable error string if there was some problem.

requestSpeak

public void requestSpeak(SpeakService speakService,
                         String message,
                         byte mode)
Requests that a speak message with the specified mode be generated and delivered via the supplied speak service instance (which will be associated with a particular "speak object"). The message will first be validated by all registered ChatFilters (and possibly vetoed) before being dispatched.

Parameters:
speakService - the speak service to use when generating the speak request or null if we should speak in the current "place".
message - the contents of the speak message.
mode - a speech mode that will be interpreted by the ChatDisplay implementations that eventually display this speak message.

requestBroadcast

public void requestBroadcast(String message)
Requests to send a site-wide broadcast message.

Parameters:
message - the contents of the message.

requestTell

public <T extends Name> void requestTell(T target,
                                         String msg,
                                         com.samskivert.util.ResultListener<T> rl)
Requests that a tell message be delivered to the specified target user.

Parameters:
target - the username of the user to which the tell message should be delivered.
msg - the contents of the tell message.
rl - an optional result listener if you'd like to be notified of success or failure.

setAwayMessage

public void setAwayMessage(String message)
Configures a message that will be automatically reported to anyone that sends a tell message to this client to indicate that we are busy or away from the keyboard.


addAuxiliarySource

public void addAuxiliarySource(DObject source,
                               String localtype)
Adds an additional object via which chat messages may arrive. The chat director assumes the caller will be managing the subscription to this object and will remain subscribed to it for as long as it remains in effect as an auxiliary chat source.

Parameters:
localtype - a type to be associated with all chat messages that arrive on the specified DObject.

removeAuxiliarySource

public void removeAuxiliarySource(DObject source)
Removes a previously added auxiliary chat source.


filter

public String filter(String msg,
                     Name otherUser,
                     boolean outgoing)
Run a message through all the currently registered filters.


mogrifyChat

public String mogrifyChat(String text)
Runs the supplied message through the various chat mogrifications.


locationMayChange

public boolean locationMayChange(int placeId)
Description copied from interface: LocationObserver
Called when someone has requested that we switch to a new location. An observer may choose to veto the location change request for some reason or other.

Specified by:
locationMayChange in interface LocationObserver
Returns:
true if it's OK for the location to change, false if the change request should be aborted.

locationDidChange

public void locationDidChange(PlaceObject place)
Description copied from interface: LocationObserver
Called when we have switched to a new location.

Specified by:
locationDidChange in interface LocationObserver
Parameters:
place - the place object that represents the new location or null if we have switched to no location.

locationChangeFailed

public void locationChangeFailed(int placeId,
                                 String reason)
Description copied from interface: LocationObserver
This is called on all location observers when a location change request is rejected by the server or fails for some other reason.

Specified by:
locationChangeFailed in interface LocationObserver
Parameters:
placeId - the place id to which we attempted to relocate, but failed.
reason - the reason code that explains why the location change request was rejected or otherwise failed.

messageReceived

public void messageReceived(MessageEvent event)
Description copied from interface: MessageListener
Called when an message event has been dispatched on an object.

Specified by:
messageReceived in interface MessageListener
Parameters:
event - The event that was dispatched on the object.

clientDidLogon

public void clientDidLogon(Client client)
Description copied from interface: SessionObserver
Called after the client successfully connected to and authenticated with the server. The entire object system is up and running by the time this method is called.

Specified by:
clientDidLogon in interface SessionObserver
Overrides:
clientDidLogon in class BasicDirector

clientObjectDidChange

public void clientObjectDidChange(Client client)
Description copied from interface: SessionObserver
For systems that allow switching screen names after logon, this method is called whenever a screen name change takes place to report that the client object has been replaced to potential client-side subscribers.

Specified by:
clientObjectDidChange in interface SessionObserver
Overrides:
clientObjectDidChange in class BasicDirector

clientDidLogoff

public void clientDidLogoff(Client client)
Description copied from interface: SessionObserver
Called after the client has been logged off of the server and has disconnected.

Specified by:
clientDidLogoff in interface SessionObserver
Overrides:
clientDidLogoff in class BasicDirector

processReceivedMessage

protected void processReceivedMessage(ChatMessage msg,
                                      String localtype)
Processes and dispatches the specified chat message.


dispatchPreparedMessage

protected void dispatchPreparedMessage(ChatMessage message)
Dispatch a message to chat displays once it is fully prepared with the clientinfo.


checkCanChat

protected String checkCanChat(SpeakService speakSvc,
                              String message,
                              byte mode)
Called to determine whether we are permitted to post the supplied chat message. Derived classes may wish to throttle chat or restrict certain types in certain circumstances for whatever reason.

Returns:
null if the chat is permitted, SUCCESS if the chat is permitted and has already been dealt with, or a translatable string indicating the reason for rejection if not.

deliverChat

protected String deliverChat(SpeakService speakSvc,
                             String message,
                             byte mode)
Delivers a plain chat message (not a slash command) on the specified speak service in the specified mode. The message will be mogrified and filtered prior to delivery.

Returns:
ChatCodes.SUCCESS if the message was delivered or a string indicating why it failed.

addToHistory

protected void addToHistory(String cmd)
Adds the specified command to the history.


mogrifyChat

protected String mogrifyChat(String text,
                             boolean transformsAllowed,
                             boolean capFirst)
Mogrifies common literary crutches into more appealing chat or commands.

Parameters:
transformsAllowed - if true, the chat may transformed into a different mode. (lol -> /emote laughs)
capFirst - if true, the first letter of the text is capitalized. This is not desired if the chat is already an emote.

mogrifyChat

protected StringBuffer mogrifyChat(StringBuffer buf,
                                   boolean transformsAllowed,
                                   boolean capFirst)
Helper function for mogrifyChat(String,boolean,boolean).


translatedReplacements

protected StringBuffer translatedReplacements(String key,
                                              StringBuffer buf)
Do all the replacements (mogrifications) specified in the translation string specified by the key.


suppressTooManyCaps

protected boolean suppressTooManyCaps()
Return true if we should lowercase messages containing more than half upper-case characters.


checkLength

protected String checkLength(String msg)
Check that after mogrification the message is not too long.

Returns:
an error message if it is too long, or null.

getCommandHandlers

protected Map<String,ChatDirector.CommandHandler> getCommandHandlers(String command)
Returns a map containing all command handlers that match the specified command (i.e. the specified command is a prefix of their registered command string). If there's an exact match, only that match is returned, even if the command is a prefix of other handlers.


isCommandPrefix

protected boolean isCommandPrefix(String enteredCommand,
                                  String handlerCommand,
                                  ChatDirector.CommandHandler handler,
                                  BodyObject user)
Returns true if enteredCommand equals or is a prefix of handlerCommand and if the handler is available for user.


addChatter

protected void addChatter(Name name)
Adds a chatter to our list of recent chatters.


notifyChatterObservers

protected void notifyChatterObservers()
Notifies all registered ChatDirector.ChatterObservers that the list of chatters has changed.


setClientInfo

protected void setClientInfo(ChatMessage msg,
                             String localType)
Set the "client info" on the specified message, if not already set.


xlate

protected String xlate(String bundle,
                       String message)
Translates the specified message using the specified bundle.


displaySystem

protected void displaySystem(String bundle,
                             String message,
                             byte attLevel,
                             String localtype)
Display the specified system message as if it had come from the server.


getLocalType

protected String getLocalType(int oid)
Looks up and returns the message type associated with the specified oid.


registerServices

protected void registerServices(Client client)
Description copied from class: BasicDirector
If a director makes use of bootstrap invocation services which are part of a bootstrap service group, it should register interest in that group here with a call to Client.addServiceGroup(java.lang.String).

Overrides:
registerServices in class BasicDirector

fetchServices

protected void fetchServices(Client client)
Description copied from class: BasicDirector
Derived directors can override this method and obtain any services they'll need during their operation via calls to Client.getService(java.lang.Class). If the director is available, it will automatically be called when the client logs on or when the director is constructed if it is constructed after the client is already logged on.

Overrides:
fetchServices in class BasicDirector