org.eclipse.emf.cdo.server
Class CDOServerBrowser

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.lifecycle.Lifecycle
          extended by org.eclipse.net4j.util.concurrent.Worker
              extended by org.eclipse.emf.cdo.server.CDOServerBrowser
All Implemented Interfaces:
INotifier, ILifecycle, ILifecycle.DeferrableActivation
Direct Known Subclasses:
CDOServerBrowser.ContainerBased

public class CDOServerBrowser
extends 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

Nested Class Summary
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.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
Worker.WorkContext
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
 
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
CDOServerBrowser(Map<String,InternalRepository> repositories)
           
 
Method Summary
protected  void clearParams()
           
protected  void doActivate()
           
protected  void doDeactivate()
           
 String escape(String raw)
           
protected  IManagedContainer getPagesContainer()
           
 String getParam(String key)
           
 int getPort()
           
 Map<String,InternalRepository> getRepositories()
           
protected  InternalRepository getRepository(String name)
           
protected  Set<String> getRepositoryNames()
           
protected  String getThreadName()
           
 String href(String label, String resource, String... params)
           
protected  void initPages(List<CDOServerBrowser.Page> pages)
           
protected  void initParams(String params)
           
protected  void printHeader(PrintStream pout)
           
 void removeParam(String key)
           
 void setPort(int port)
           
protected  void showMenu(PrintStream pout)
           
protected  void showPage(PrintStream pout, CDOServerBrowser.Page page)
           
protected  void work(Worker.WorkContext context)
           
 
Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, 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, fireEvent, fireEvent, fireEvent, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, 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(Map<String,InternalRepository> repositories)
Method Detail

getRepositories

public Map<String,InternalRepository> getRepositories()

getPort

public int getPort()

setPort

public void setPort(int port)

work

protected void work(Worker.WorkContext context)
             throws Exception
Specified by:
work in class Worker
Throws:
Exception

initParams

protected void initParams(String params)

clearParams

protected void clearParams()

removeParam

public void removeParam(String key)

getParam

public String getParam(String key)

href

public String href(String label,
                   String resource,
                   String... params)

escape

public String escape(String raw)

printHeader

protected void printHeader(PrintStream pout)

showMenu

protected void showMenu(PrintStream pout)

showPage

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

getRepositoryNames

protected Set<String> getRepositoryNames()

getRepository

protected InternalRepository getRepository(String name)

getThreadName

protected String getThreadName()
Overrides:
getThreadName in class Worker

initPages

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

getPagesContainer

protected IManagedContainer getPagesContainer()
Since:
4.1

doActivate

protected void doActivate()
                   throws Exception
Overrides:
doActivate in class Worker
Throws:
Exception

doDeactivate

protected void doDeactivate()
                     throws Exception
Overrides:
doDeactivate in class Worker
Throws:
Exception


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.