Package org.eclipse.emf.cdo.server

## Class CDOServerBrowser

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.concurrent.Worker
      - - org.eclipse.emf.cdo.server.CDOServerBrowser

- All Implemented Interfaces:
    `org.eclipse.net4j.util.event.INotifier`, `org.eclipse.net4j.util.event.INotifier.INotifier2`, `org.eclipse.net4j.util.lifecycle.IDeactivateable`, `org.eclipse.net4j.util.lifecycle.ILifecycle`, `org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`
  Direct Known Subclasses:
    `CDOServerBrowser.ContainerBased`

      public class CDOServerBrowser
      extends org.eclipse.net4j.util.concurrent.Worker

  A simple HTTP server that web browsers can connect to in order to render internal server data for debugging purposes.

  Actual content is contributed through pluggable `pages`.

  Note: Don't use this server in production, it's unsecure and does not perform or scale!

  Since:
    4.0
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `CDOServerBrowser.AbstractPage` | An abstract base implementation of a `server browser page`.
    `static class` | `CDOServerBrowser.ContainerBased` | A `server browser` for the repositories in a `managed container`.
    `static class` | `CDOServerBrowser.HistoryPage` | A `server browser page` that renders `commit infos`.
    `static class` | `CDOServerBrowser.LobsPage` | A `server browser page` that renders `large object infos`.
    `static class` | `CDOServerBrowser.LocksPage` | A `server browser page` that renders the locking manager contents of a repository.
    `static class` | `CDOServerBrowser.PackagesPage` | A `server browser page` that renders the package registry contents of a repository.
    `static interface` | `CDOServerBrowser.Page` | Represents pluggable content for a `server browser`.
    `static class` | `CDOServerBrowser.RevisionsPage` | A `server browser page` that renders `revisions`.

    - ### Nested classes/interfaces inherited from class org.eclipse.net4j.util.concurrent.Worker

      `org.eclipse.net4j.util.concurrent.Worker.WorkContext`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `org.eclipse.net4j.util.event.INotifier.INotifier2`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.concurrent.Worker

      `DEFAULT_ERROR_HANDLER, DEFAULT_TIMEOUT`

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CDOServerBrowser​(java.util.Map<java.lang.String,​InternalRepository> repositories)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `clearParams()` |
    `protected void` | `doActivate()` |
    `protected void` | `doDeactivate()` |
    `java.lang.String` | `escape​(java.lang.String raw)` |
    `static java.lang.String` | `formatTimeStamp​(long timeStamp)` |
    `protected org.eclipse.net4j.util.container.IManagedContainer` | `getPagesContainer()` |
    `java.lang.String` | `getParam​(java.lang.String key)` |
    `int` | `getPort()` |
    `java.util.Map<java.lang.String,​InternalRepository>` | `getRepositories()` |
    `protected InternalRepository` | `getRepository​(java.lang.String name)` |
    `protected java.util.Set<java.lang.String>` | `getRepositoryNames()` |
    `protected java.lang.String` | `getThreadName()` |
    `java.lang.String` | `href​(java.lang.String label, java.lang.String resource, java.lang.String... params)` |
    `protected void` | `initPages​(java.util.List<CDOServerBrowser.Page> pages)` |
    `protected void` | `initParams​(java.lang.String params)` |
    `boolean` | `isParam​(java.lang.String key)` |
    `protected void` | `printHeader​(java.io.PrintStream pout)` |
    `void` | `removeParam​(java.lang.String key)` |
    `void` | `setPort​(int port)` |
    `protected void` | `showMenu​(java.io.PrintStream pout)` |
    `protected void` | `showPage​(java.io.PrintStream pout, CDOServerBrowser.Page page)` |
    `protected void` | `work​(org.eclipse.net4j.util.concurrent.Worker.WorkContext context)` |

    - ### Methods inherited from class org.eclipse.net4j.util.concurrent.Worker

      `getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getWorkerThread, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandler`

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### CDOServerBrowser

          public CDOServerBrowser​(java.util.Map<java.lang.String,​InternalRepository> repositories)

  - ### Method Detail

    - #### getRepositories

          public java.util.Map<java.lang.String,​InternalRepository> getRepositories()

    - #### getPort

          public int getPort()

    - #### setPort

          public void setPort​(int port)

    - #### work

          protected void work​(org.eclipse.net4j.util.concurrent.Worker.WorkContext context)
                       throws java.lang.Exception

      Specified by:
        `work` in class `org.eclipse.net4j.util.concurrent.Worker`
      Throws:
        `java.lang.Exception`

    - #### initParams

          protected void initParams​(java.lang.String params)

    - #### clearParams

          protected void clearParams()

    - #### removeParam

          public void removeParam​(java.lang.String key)

    - #### getParam

          public java.lang.String getParam​(java.lang.String key)

    - #### isParam

          public boolean isParam​(java.lang.String key)

      Since:
        4.5

    - #### href

          public java.lang.String href​(java.lang.String label,
                                       java.lang.String resource,
                                       java.lang.String... params)

    - #### escape

          public java.lang.String escape​(java.lang.String raw)

    - #### printHeader

          protected void printHeader​(java.io.PrintStream pout)

    - #### showMenu

          protected void showMenu​(java.io.PrintStream pout)

    - #### showPage

          protected void showPage​(java.io.PrintStream pout,
                                  CDOServerBrowser.Page page)

    - #### getRepositoryNames

          protected java.util.Set<java.lang.String> getRepositoryNames()

    - #### getRepository

          protected InternalRepository getRepository​(java.lang.String name)

    - #### getThreadName

          protected java.lang.String getThreadName()

      Overrides:
        `getThreadName` in class `org.eclipse.net4j.util.concurrent.Worker`

    - #### initPages

          protected void initPages​(java.util.List<CDOServerBrowser.Page> pages)

    - #### getPagesContainer

          protected org.eclipse.net4j.util.container.IManagedContainer getPagesContainer()

      Since:
        4.1

    - #### doActivate

          protected void doActivate()
                             throws java.lang.Exception

      Overrides:
        `doActivate` in class `org.eclipse.net4j.util.concurrent.Worker`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `org.eclipse.net4j.util.concurrent.Worker`
      Throws:
        `java.lang.Exception`

    - #### formatTimeStamp

          public static java.lang.String formatTimeStamp​(long timeStamp)

      Since:
        4.5