|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.crowd.client.TestClient
public class TestClient
A client that is useful when doing unit testing.
| Nested Class Summary | |
|---|---|
protected class |
TestClient.CrowdContextImpl
|
| Field Summary | |
|---|---|
protected ChatDirector |
_chatdir
|
protected Client |
_client
|
protected CrowdContext |
_ctx
|
protected LocationDirector |
_locdir
|
protected MessageManager |
_msgmgr
|
protected OccupantDirector |
_occdir
|
protected BasicRunQueue |
_rqueue
|
| Constructor Summary | |
|---|---|
TestClient(String username)
|
|
| Method Summary | |
|---|---|
void |
clientConnectionFailed(Client client,
Exception cause)
Called when the connection to the server went away for some unexpected reason. |
void |
clientDidClear(Client client)
Called after the client is completely logged off from a successful session and is ready to reconnect to a new server if desired. |
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 |
clientFailedToLogon(Client client,
Exception cause)
Called if anything fails during the logon attempt. |
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. |
boolean |
clientWillLogoff(Client client)
Called when an abortable logoff request is made. |
void |
clientWillLogon(Client client)
Called immediately before a logon is attempted. |
protected CrowdContext |
createContext()
|
static void |
main(String[] args)
|
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Client _client
protected CrowdContext _ctx
protected LocationDirector _locdir
protected OccupantDirector _occdir
protected MessageManager _msgmgr
protected ChatDirector _chatdir
protected BasicRunQueue _rqueue
| Constructor Detail |
|---|
public TestClient(String username)
| Method Detail |
|---|
public void run()
public void clientWillLogon(Client client)
SessionObserver
clientWillLogon in interface SessionObserverpublic void clientDidLogon(Client client)
SessionObserver
clientDidLogon in interface SessionObserverpublic void clientObjectDidChange(Client client)
SessionObserver
clientObjectDidChange in interface SessionObserver
public void clientFailedToLogon(Client client,
Exception cause)
ClientObserver
clientFailedToLogon in interface ClientObservercause - an exception indicating the cause of the logon failure. Note: this
may be a LogonException and if so, the caller must check LogonException.isStillInProgress() to find out if the logon process has totally failed or if
we are simply reporting intermediate status (we might be falling back to an alternative port
or delaying our auto-retry attempt due to server overload).
public void clientConnectionFailed(Client client,
Exception cause)
ClientObserverSessionObserver.clientDidLogoff(com.threerings.presents.client.Client).
clientConnectionFailed in interface ClientObserverpublic boolean clientWillLogoff(Client client)
ClientObserver
clientWillLogoff in interface ClientObserverpublic void clientDidLogoff(Client client)
SessionObserver
clientDidLogoff in interface SessionObserverpublic void clientDidClear(Client client)
ClientObserverClientObserver.clientFailedToLogon(com.threerings.presents.client.Client, java.lang.Exception).
clientDidClear in interface ClientObserverprotected CrowdContext createContext()
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||