jrunx.resource
Class ResourceService
jrunx.kernel.ServiceAdapter
|
+--jrunx.kernel.ServicePartition
|
+--jrunx.kernel.ConfigurableServicePartition
|
+--jrunx.resource.ResourceService
- All Implemented Interfaces:
- ConfigurableServicePartitionMBean, javax.naming.Referenceable, ResourceServiceInterface, ResourceServiceMBean, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean
- public class ResourceService
- extends ConfigurableServicePartition
- implements ResourceServiceInterface
JRun Resource Service. This service serves as a factory for
creating ResourceManager's that are responsible for the management
of resources at a given document root directory.
- Author:
- Karl Moss
- See Also:
- Serialized Form
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
| Methods inherited from class jrunx.kernel.ConfigurableServicePartition |
destroy, destroyServices, init, initServices, loadAndInit, loadChildren, setChildElements, start, startServices, stop, stopServices |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
ResourceService
public ResourceService()
setResourceCheckInterval
public void setResourceCheckInterval(long ms)
- Description copied from interface:
ResourceServiceMBean
- The number of milliseconds between checking for a change in a cached
resource. A setting of -1 will result in disabling the refreshing of
resource caches
- Specified by:
setResourceCheckInterval in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Parameters:
interval - Number of ms before checking for a new resource
getResourceCheckInterval
public long getResourceCheckInterval()
- Description copied from interface:
ResourceServiceMBean
- Gets the resource check interval
- Specified by:
getResourceCheckInterval in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Returns:
- The number of ms before checking for a new resource
setResourceCacheSize
public void setResourceCacheSize(int size)
- Description copied from interface:
ResourceServiceMBean
- Sets the size of the internal buffer used to cache static resources. The
default is 8096 bytes. Increasing this size may improve performance at the
cost of additional server memory
- Specified by:
setResourceCacheSize in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Parameters:
size - The size of the internal cache buffer in bytes
getResourceCacheSize
public int getResourceCacheSize()
- Description copied from interface:
ResourceServiceMBean
- Returns the size of the internal buffer used to cache static resources.
- Specified by:
getResourceCacheSize in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Returns:
- The size of the internal cache buffer in bytes
createResourceManager
public ResourceManager createResourceManager(java.lang.String docRoot)
- Description copied from interface:
ResourceServiceMBean
- Factory method for creating a new ResourceManager. A ResourceManager
is responsible for delivering Resource entries from the given document
root directory.
- Specified by:
createResourceManager in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Parameters:
docRoot - The document root directory- Returns:
- The new ResourceManager for handling resources out of the root directory
- Throws:
java.lang.IllegalArgumentException - if the root directory does not exist, or is not a
directory
createResourceManager
public ResourceManager createResourceManager(java.lang.String docRoot,
ServiceAdapter context)
- Description copied from interface:
ResourceServiceMBean
- Factory method for creating a new ResourceManager. A ResourceManager
is responsible for delivering Resource entries from the given document
root directory.
- Specified by:
createResourceManager in interface ResourceServiceMBean
- Following copied from interface:
jrunx.resource.ResourceServiceMBean
- Parameters:
docRoot - The document root directorycontext - The calling ServiceAdapter- Returns:
- The new ResourceManager for handling resources out of the root directory
- Throws:
java.lang.IllegalArgumentException - if the root directory does not exist, or is not a
directory
formatDirectory
public java.io.InputStream formatDirectory(ServiceAdapter context,
java.lang.String path,
java.util.List members)
- Description copied from interface:
ResourceServiceInterface
- Formats the directory listing. Uses the registered DirectoryFormatterService
to perform the actual work. Returns null if the directory cannot be formatted.
- Specified by:
formatDirectory in interface ResourceServiceInterface
- Following copied from interface:
jrunx.resource.ResourceServiceInterface
- Parameters:
context - The context from which this resource request is being madepath - The directory pathlist - The members of the directory- Returns:
- The InputStream used for reading the directory listing
Copyright � 2002 Macromedia Corporation. All Rights Reserved.