org.jdesktop.wonderland.client
Class ClientContext

java.lang.Object
  extended by org.jdesktop.wonderland.client.ClientContext
Direct Known Subclasses:
ClientContextJME

public class ClientContext
extends java.lang.Object

Provides global static access to the various client subsystems.

Author:
paulby

Constructor Summary
ClientContext()
           
 
Method Summary
static CellCache getCellCache(WonderlandSession session)
          Return the CellCache if the session has one, otherwise return null
static CellManager getCellManager()
          Return the CellManager for this client
static InputManager getInputManager()
           
static Cell.RendererType getRendererType()
          Return the default render type for a client
static ServerSessionManager getSessionManager(java.lang.String serverURL)
           
static java.io.File getUserDirectory()
          Return the wonderland user directory for this user
static java.io.File getUserDirectory(java.lang.String dirName)
          Return a subdirectory of the wonderland user directory for this user
static void registerCellCache(CellCache clientCellCache, WonderlandSession session)
          Register the implementation of CellCache for the session.
static void registerInputManager(InputManager regInputManager)
           
static void resetUserDirectory()
           
static void setRendererType(Cell.RendererType rendererType)
          Set the default render type for a client.
static void setUserDirectory(java.io.File userDir, boolean save)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientContext

public ClientContext()
Method Detail

getCellCache

public static CellCache getCellCache(WonderlandSession session)
Return the CellCache if the session has one, otherwise return null

Returns:

registerCellCache

public static void registerCellCache(CellCache clientCellCache,
                                     WonderlandSession session)
Register the implementation of CellCache for the session. This call can only be made once. If you attempt to call this method more than once a RuntimeException will be thrown;

Parameters:
clientCellCache -

getCellManager

public static CellManager getCellManager()
Return the CellManager for this client

Returns:

registerInputManager

public static void registerInputManager(InputManager regInputManager)
Parameters:
regInputManager -

getInputManager

public static InputManager getInputManager()

getSessionManager

public static ServerSessionManager getSessionManager(java.lang.String serverURL)
                                              throws java.io.IOException
Throws:
java.io.IOException

setRendererType

public static void setRendererType(Cell.RendererType rendererType)
Set the default render type for a client. This needs to be set very early during startup and should not be changed once the system is running.

Parameters:
rendererType -

getRendererType

public static Cell.RendererType getRendererType()
Return the default render type for a client

Returns:

getUserDirectory

public static java.io.File getUserDirectory()
Return the wonderland user directory for this user

Returns:
the user directory

getUserDirectory

public static java.io.File getUserDirectory(java.lang.String dirName)
Return a subdirectory of the wonderland user directory for this user

Parameters:
dirName - the name of the subdirectory
Returns:
the user directory subdirectory, created if it doesn't exist

setUserDirectory

public static void setUserDirectory(java.io.File userDir,
                                    boolean save)
Parameters:
userDirectory - the user directory to use
save - if true, save this value in a preference for future use

resetUserDirectory

public static void resetUserDirectory()


Open Wonderland - http://openwonderland.org