Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.cache
Class Request

java.lang.Object
  extended by eu.esdihumboldt.hale.common.cache.Request

public class Request
extends Object

This class manages requests and caching for remote files.

Author:
Andreas Burchert
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Method Summary
 void clear()
           
 void flush()
           
 InputStream get(String uri)
           
 InputStream get(URI uri)
          This function handles all Request and does the caching.
static Request getInstance()
          Returns the instance of this class
 boolean isCacheEnabled()
          Is true if caching is enabled.
 void setCacheEnabled(boolean enabled)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Request getInstance()
Returns the instance of this class

Returns:
instance

get

public InputStream get(String uri)
                throws URISyntaxException,
                       Exception
Parameters:
uri - to load from
Returns:
InputStream
Throws:
URISyntaxException - if the URI is malformed
Exception - may contain IOException
See Also:
get(URI)

get

public InputStream get(URI uri)
                throws Exception
This function handles all Request and does the caching.

Parameters:
uri - to file
Returns:
an InputStream to uri
Throws:
Exception - if something goes wrong

flush

public void flush()
See Also:
CacheManager.flush(String)

shutdown

public void shutdown()
See Also:
CacheManager.shutdown()

clear

public void clear()
See Also:
CacheManager.removalAll()

isCacheEnabled

public boolean isCacheEnabled()
Is true if caching is enabled.

Returns:
boolean

setCacheEnabled

public void setCacheEnabled(boolean enabled)
Parameters:
enabled - enabled

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d