Class ProgrammaticLogin<T extends WonderlandSession>

  extended by org.jdesktop.wonderland.client.login.ProgrammaticLogin<T>

public class ProgrammaticLogin<T extends WonderlandSession>
extends java.lang.Object

Utility class to handle login to a Wonderland server. Given a serverURL, username, and optionally the path to a password file, this class will create a WonderlandSession connected to the given server.

Jonathan Kaplan

Constructor Summary
ProgrammaticLogin(java.lang.String serverURL)
          Create a new ProgrammaticLogin that connects to the given server.
Method Summary
protected  T createSession(ServerSessionManager sessionManager, WonderlandServerInfo server, java.lang.ClassLoader loader)
          Create a new WonderlandSession.
 java.lang.String getServerURL()
          Get the URL of the server this login object is connected to.
 T login(java.lang.String username, passwordFile)
          Login to the server with the given credentials.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ProgrammaticLogin(java.lang.String serverURL)
Create a new ProgrammaticLogin that connects to the given server.

serverURL - the server URL to connect to.
Method Detail


public java.lang.String getServerURL()
Get the URL of the server this login object is connected to.

the server URL.


public T login(java.lang.String username,
Login to the server with the given credentials. This returns a WonderlandSession which is connected to the server.

username - the username to connect with. Required.
passwordFile - a file containing the password to connect with. Optional. Only used when security is set up to require a username and password for login.
the WonderlandSession created after connecting.


protected T createSession(ServerSessionManager sessionManager,
                          WonderlandServerInfo server,
                          java.lang.ClassLoader loader)
Create a new WonderlandSession. This method is provided so subclasses can override it to return different session types.

sessionManager - the session manager that created this session
server - the server the session is connected to
loader - the classloader for use in the session
a newly created WonderlandSession object

Open Wonderland -