org.openqa.grid.internal
Class ExternalSessionKey

java.lang.Object
  extended by org.openqa.grid.internal.ExternalSessionKey

public class ExternalSessionKey
extends java.lang.Object


Constructor Summary
ExternalSessionKey(java.lang.String key)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
static ExternalSessionKey fromJSON(java.lang.String keyString)
           
static ExternalSessionKey fromResponseBody(java.lang.String responseBody)
          extract the external key from the server response for a selenium1 new session request.
static ExternalSessionKey fromSe1Request(java.lang.String piece)
           
static ExternalSessionKey fromString(java.lang.String keyString)
           
static ExternalSessionKey fromWebDriverRequest(java.lang.String path)
          extract the session xxx from http://host:port/a/b/c/session/xxx/...
 java.lang.String getKey()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExternalSessionKey

public ExternalSessionKey(java.lang.String key)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getKey

public java.lang.String getKey()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

fromSe1Request

public static ExternalSessionKey fromSe1Request(java.lang.String piece)

fromWebDriverRequest

public static ExternalSessionKey fromWebDriverRequest(java.lang.String path)
extract the session xxx from http://host:port/a/b/c/session/xxx/...

Parameters:
path - The path to the session
Returns:
the ExternalSessionKey provided by the remote., or null if the url didn't contain a session id

fromResponseBody

public static ExternalSessionKey fromResponseBody(java.lang.String responseBody)
                                           throws NewSessionException
extract the external key from the server response for a selenium1 new session request.

Parameters:
responseBody - the response from the server
Returns:
the ExternalKey if it was present in the server's response.
Throws:
NewSessionException - in case the server didn't send back a success result.

fromString

public static ExternalSessionKey fromString(java.lang.String keyString)

fromJSON

public static ExternalSessionKey fromJSON(java.lang.String keyString)


Copyright © 2011. All Rights Reserved.