Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openqa.selenium.server
Class SeleniumDriverResourceHandler

    java.lang.Object
      org.mortbay.http.handler.AbstractHttpHandler
          org.mortbay.http.handler.ResourceHandler
              org.openqa.selenium.server.SeleniumDriverResourceHandler

All Implemented Interfaces:
  java.io.Serializable, org.mortbay.http.HttpHandler, org.mortbay.util.LifeCycle

    public class SeleniumDriverResourceHandler

extends org.mortbay.http.handler.ResourceHandler

A Jetty handler that takes care of remote Selenium requests. Remote Selenium requests are described in detail in the class description for `SeleniumServer`

Version:
  $Revision: 674 $
Author:
  Paul Hammant
See Also:
  `SeleniumServer`, Serialized Form

Constructor Summary
`SeleniumDriverResourceHandler(SeleniumServer remoteControl)`

Method Summary
`protected java.io.File` | `createTempFile(java.lang.String name)`
`void` | `deregisterBrowserSession(BrowserSessionFactory.BrowserSessionInfo sessionInfo)` De-registers the given browser session from among the active sessions.
`java.lang.String` | `doCommand(java.lang.String cmd, java.util.Vector<java.lang.String> values, java.lang.String sessionId, org.mortbay.http.HttpResponse res)`
`protected void` | `downloadWithAnt(java.net.URL url, java.io.File outputFile)`
`BrowserLauncherFactory` | `getBrowserLauncherFactory()`
`static java.lang.String` | `getLastSessionId()`
`protected java.lang.String` | `getNewBrowserSession(java.lang.String browserString, java.lang.String startURL, java.lang.String extensionJs, BrowserConfigurationOptions browserConfigurations)`
`protected FrameGroupCommandQueueSet` | `getQueueSet(java.lang.String sessionId)`
`protected static java.lang.String` | `getSpeedForSession(java.lang.String sessionId)`
`void` | `handle(java.lang.String pathInContext, java.lang.String pathParams, org.mortbay.http.HttpRequest req, org.mortbay.http.HttpResponse res)`
`void` | `registerBrowserSession(BrowserSessionFactory.BrowserSessionInfo sessionInfo)` Registers the given browser session among the active sessions to handle.
`void` | `setBrowserLauncherFactory(BrowserLauncherFactory browserLauncherFactory)`
`static void` | `setLastSessionId(java.lang.String sessionId)`
`protected static void` | `setSpeedForSession(java.lang.String sessionId, int speed)`
`void` | `stopAllBrowsers()` Kills all running browsers

Methods inherited from class org.mortbay.http.handler.ResourceHandler
`getAllowedMethods, getAllowedString, getMinGzipLength, getRedirectWelcome, getResource, handleGet, isAcceptRanges, isDirAllowed, isMethodAllowed, sendData, setAcceptRanges, setAllowedMethods, setDirAllowed, setMinGzipLength, setRedirectWelcome, start, stop, writeHeaders`

Methods inherited from class org.mortbay.http.handler.AbstractHttpHandler
`getHttpContext, getName, handleTrace, initialize, isStarted, setName, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SeleniumDriverResourceHandler

    public SeleniumDriverResourceHandler(SeleniumServer remoteControl)

Method Detail

### handle

    public void handle(java.lang.String pathInContext,
                       java.lang.String pathParams,
                       org.mortbay.http.HttpRequest req,
                       org.mortbay.http.HttpResponse res)
                throws org.mortbay.http.HttpException,
                       java.io.IOException

  Specified by:
    `handle` in interface `org.mortbay.http.HttpHandler`
  Overrides:
    `handle` in class `org.mortbay.http.handler.ResourceHandler`
  Throws:
    `org.mortbay.http.HttpException`
    `java.io.IOException`

### getQueueSet

    protected FrameGroupCommandQueueSet getQueueSet(java.lang.String sessionId)

### doCommand

    public java.lang.String doCommand(java.lang.String cmd,
                                      java.util.Vector<java.lang.String> values,
                                      java.lang.String sessionId,
                                      org.mortbay.http.HttpResponse res)

### downloadWithAnt

    protected void downloadWithAnt(java.net.URL url,
                                   java.io.File outputFile)

### createTempFile

    protected java.io.File createTempFile(java.lang.String name)

### getSpeedForSession

    protected static java.lang.String getSpeedForSession(java.lang.String sessionId)

### setSpeedForSession

    protected static void setSpeedForSession(java.lang.String sessionId,
                                             int speed)

### getNewBrowserSession

    protected java.lang.String getNewBrowserSession(java.lang.String browserString,
                                                    java.lang.String startURL,
                                                    java.lang.String extensionJs,
                                                    BrowserConfigurationOptions browserConfigurations)
                                             throws RemoteCommandException

  Throws:
    `RemoteCommandException`

### registerBrowserSession

    public void registerBrowserSession(BrowserSessionFactory.BrowserSessionInfo sessionInfo)

  Registers the given browser session among the active sessions to handle. Usually externally created browser sessions are managed themselves, but registering them allows the shutdown procedures to be simpler.

  Parameters:
    `sessionInfo` - the externally created browser session to register.

### deregisterBrowserSession

    public void deregisterBrowserSession(BrowserSessionFactory.BrowserSessionInfo sessionInfo)

  De-registers the given browser session from among the active sessions. When an externally managed but registered session is closed, this method should be called to keep the set of active sessions up to date.

  Parameters:
    `sessionInfo` - the session to deregister.

### stopAllBrowsers

    public void stopAllBrowsers()

  Kills all running browsers

### getLastSessionId

    public static java.lang.String getLastSessionId()

### setLastSessionId

    public static void setLastSessionId(java.lang.String sessionId)

### getBrowserLauncherFactory

    public BrowserLauncherFactory getBrowserLauncherFactory()

### setBrowserLauncherFactory

    public void setBrowserLauncherFactory(BrowserLauncherFactory browserLauncherFactory)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.