com.faunos.skwish.ext.http
Class SkwishHttpMountPoint

java.lang.Object
  extended by com.faunos.skwish.ext.http.SkwishHttpMountPoint
All Implemented Interfaces:
Closeable

public class SkwishHttpMountPoint
extends Object
implements Closeable

Represents a skwish "mount" point on the HTTP server. A mount point defines a base (root) URL on the server from which one or more skwish SegmentStores can be accessed.

Serialized Access

This class is designed for serialized access. This generally means that both the server's ResponseFactoryConfig methods and the methods defined in this class must be accessed serially. Concurrent access results in undefined behavior.

Author:
Babak Farhang

Method Summary
 void close()
          Closes this instance and unregisters the associated skwish ResponseFactory from the Caroon HTTP server.
 boolean equals(Object o)
          Equality semantics is based on the identity of the contained ResponseFactory.
 String getBaseUri()
          Returns the base URI for this mount point on the HTTP server.
 Map<String,String> getRelativeUriToSkwishMappings()
          Returns a map representing relative HTTP URI to skwish URI mappings.
 int hashCode()
          Returns the hash code consistent with equals(Object).
 void mapRelativeUriToSkwish(String relHttpUri, SegmentStore store)
          Maps the given HTTP URI subpath to the specified store.
 void mapRelativeUriToSkwish(String relHttpUri, String skwishUri)
          Maps the given HTTP URI subpath to the specified skwish URI.
 void setRelativeUriToSkwishMappings(Map<String,String> mappings)
          Sets the relative HTTP URI to skwish URI mappings.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()
           throws IOException
Closes this instance and unregisters the associated skwish ResponseFactory from the Caroon HTTP server. The underlying SegmentStores, are not closed.

Specified by:
close in interface Closeable
Throws:
ConcurrentModificationException - thrown on a best efforts basis
IOException

getBaseUri

public String getBaseUri()
Returns the base URI for this mount point on the HTTP server. This is just the root of the request URI.


mapRelativeUriToSkwish

public void mapRelativeUriToSkwish(String relHttpUri,
                                   String skwishUri)
Maps the given HTTP URI subpath to the specified skwish URI.


mapRelativeUriToSkwish

public void mapRelativeUriToSkwish(String relHttpUri,
                                   SegmentStore store)
Maps the given HTTP URI subpath to the specified store.


getRelativeUriToSkwishMappings

public Map<String,String> getRelativeUriToSkwishMappings()
Returns a map representing relative HTTP URI to skwish URI mappings. The returned map is read-only.


setRelativeUriToSkwishMappings

public void setRelativeUriToSkwishMappings(Map<String,String> mappings)
Sets the relative HTTP URI to skwish URI mappings.


equals

public final boolean equals(Object o)
Equality semantics is based on the identity of the contained ResponseFactory. This translates to intuitive semantics vis-a-vis SkwishHttpServer.newSkwishMountPoint(String)

Overrides:
equals in class Object

hashCode

public final int hashCode()
Returns the hash code consistent with equals(Object).

Overrides:
hashCode in class Object


SourceForge.net Logo