Class StaticResourceMapping

java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.emf.cdo.server.rest.jetty.StaticResourceMapping
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

public final class StaticResourceMapping extends org.eclipse.net4j.util.lifecycle.Lifecycle
Describes one explicitly configured public static resource context for the standalone Jetty REST listener.
Author:
Eike Stepper
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.net4j.util.event.Notifier

    org.eclipse.net4j.util.event.Notifier.Cancelation

    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
    Modifier and Type
    Field
    Description
    static final String
    Factory product group used by nested static transport elements.

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

    USE_LABEL
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty mapping for AnnotationFactory configuration.
    StaticResourceMapping(String path, String resourceBase)
    Creates a mapping for the given URL path and filesystem directory.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    Returns the URL context path that identifies this static resource context.
    Returns the filesystem directory exposed by this mapping.
    void
    Sets the URL context path before this mapping is configured.
    void
    setResourceBase(String resourceBase)
    Sets the filesystem directory exposed by this mapping.

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

    activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeDeactivate, doCancelActivation, doDeactivate, 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 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
  • Field Details

    • PRODUCT_GROUP

      public static final String PRODUCT_GROUP
      Factory product group used by nested static transport elements.
      See Also:
  • Constructor Details

    • StaticResourceMapping

      public StaticResourceMapping()
      Creates an empty mapping for AnnotationFactory configuration.
    • StaticResourceMapping

      public StaticResourceMapping(String path, String resourceBase)
      Creates a mapping for the given URL path and filesystem directory.
      Parameters:
      path - an absolute URL context path
      resourceBase - a filesystem directory to expose
  • Method Details

    • getPath

      public String getPath()
      Returns the URL context path that identifies this static resource context.
      Returns:
      the configured absolute context path
    • setPath

      public void setPath(String path)
      Sets the URL context path before this mapping is configured.
      Parameters:
      path - the absolute URL context path
    • getResourceBase

      public String getResourceBase()
      Returns the filesystem directory exposed by this mapping.
      Returns:
      the configured filesystem path
    • setResourceBase

      public void setResourceBase(String resourceBase)
      Sets the filesystem directory exposed by this mapping.
      Parameters:
      resourceBase - the directory path resolved by the server process
    • doBeforeActivate

      protected void doBeforeActivate() throws Exception
      Overrides:
      doBeforeActivate in class org.eclipse.net4j.util.lifecycle.Lifecycle
      Throws:
      Exception