|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrunx.kernel.ServiceAdapter
|
+--jrunx.kernel.ServicePartition
|
+--jrunx.kernel.ConfigurableServicePartition
|
+--jrun.servlet.ServletEngineService
The servlet engine. This class serves as a service partition to all of the servlet services, and also serves as the main dispatcher for servlet requests.
| Field Summary | |
static java.lang.String |
DEFAULT_MAP_HOST
|
| Fields inherited from class jrunx.kernel.ServicePartition |
sortedServices |
| 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 |
| Fields inherited from interface jrunx.kernel.Service |
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED |
| Constructor Summary | |
ServletEngineService()
|
|
| Method Summary | |
void |
addService(ServiceMBean service,
javax.management.ObjectName serviceName)
Add a ServiceMBean to the partitioned Services using the specified ObjectName for the Service. |
void |
destroy()
Every service is eventually destroyed. |
void |
dispatch(ServletConnection connection)
this is the main servlet engine entry point, for every request going to every webapp. |
protected java.util.Set |
findMappingsByHost(java.lang.String host)
|
protected WebApplication |
findMatchingPrefix(java.util.Set maps,
java.lang.String uri)
|
WebApplication |
findWebApplication(java.lang.String uri)
called by JRunServletContext.getContext() to locate other webapps within the same logical host. |
protected WebApplication |
findWebApplication(java.lang.String host,
int port,
java.lang.String uri)
|
java.lang.String |
getDefaultLocale()
Gets the current default locale for the VM |
java.util.Set |
getExpandedMappings()
Return all the mappings for each of the web-apps we know about. |
java.lang.String |
getMimeType(java.lang.String name)
Gets the mime type for the given resource name |
java.lang.String |
getMimeTypesPath()
Gets the path of the mime.types file, or null if none. |
ReplicationIdService |
getReplicationIdService()
Get the ReplicationIdService |
long |
getServletCheckInterval()
Gets the servlet check interval |
ServletEngine |
getServletEngine()
Returns a direct reference to the servlet engine |
ServletUsers |
getServletUsers()
Get a direct reference to the ServletUsers for the servlet engine |
SessionReplicationService |
getSessionReplicationService()
|
void |
init()
Not every service needs to init, implement it out of convenience. |
protected void |
processMimeTypes(java.io.InputStream in)
Read and process the mime.types file. |
void |
removeService(ServiceMBean service)
Override removeService so we can remove webapps from the list of mappings |
void |
setDefaultLocale(java.lang.String locale)
Sets the new default locale for the entire VM |
void |
setMimeMapping(MimeMapping mapping)
Sets (adds) a new MimeMapping for the servlet engine |
void |
setMimeTypesPath(java.lang.String path)
Sets the path of the mime.types file. |
void |
setServletCheckInterval(long ms)
The number of milliseconds between checking for a change in a servlet class file. |
void |
setVirtualHostMapping(VirtualHostMapping mapping)
Sets (adds) a new VirtualHostMapping for the servlet engine |
void |
setWebAppMapping(WebAppMapping mapping)
Sets (adds) a new WebAppMapping for the servlet engine. |
void |
start()
Every service other than mere data collections should start |
void |
stop()
Every service other than mere data collections should stop |
| Methods inherited from class jrunx.kernel.ConfigurableServicePartition |
destroyServices, initServices, loadAndInit, loadChildren, setChildElements, startServices, stopServices |
| Methods inherited from class jrunx.kernel.ServicePartition |
addService, getServices, invokeChain, iterator, removeService |
| Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean |
setChildElements |
| Methods inherited from interface jrunx.kernel.ServicePartitionMBean |
addService, iterator, removeService |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
| Methods inherited from interface jrunx.kernel.Service |
getStatus, updateStatus |
| Field Detail |
public static final java.lang.String DEFAULT_MAP_HOST
| Constructor Detail |
public ServletEngineService()
| Method Detail |
public ServletEngine getServletEngine()
ServletEngineServiceMBeangetServletEngine in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanpublic void setServletCheckInterval(long ms)
ServletEngineServiceMBeansetServletCheckInterval in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeaninterval - Number of ms before checking for a new servlet classpublic long getServletCheckInterval()
ServletEngineServiceMBeangetServletCheckInterval in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBean
public void init()
throws java.lang.Exception
ServiceAdapterinit in interface Serviceinit in class ConfigurableServicePartition
public void start()
throws java.lang.Exception
ServiceAdapterstart in interface Servicestart in class ConfigurableServicePartition
public void stop()
throws java.lang.Exception
ServiceAdapterstop in interface Servicestop in class ConfigurableServicePartition
public void destroy()
throws java.lang.Exception
ServiceAdapterdestroy in interface Servicedestroy in class ConfigurableServicePartition
public void addService(ServiceMBean service,
javax.management.ObjectName serviceName)
throws java.lang.Exception
ServicePartitionMBeanaddService in interface ServicePartitionMBeanaddService in class ServicePartitionpublic ServletUsers getServletUsers()
ServletEnginegetServletUsers in interface ServletEnginepublic ReplicationIdService getReplicationIdService()
ServletEnginegetReplicationIdService in interface ServletEnginepublic SessionReplicationService getSessionReplicationService()
getSessionReplicationService in interface ServletEnginepublic void setVirtualHostMapping(VirtualHostMapping mapping)
ServletEngineServiceMBeansetVirtualHostMapping in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanmapping - The new mapping to add
public void setWebAppMapping(WebAppMapping mapping)
throws java.lang.Exception
ServletEnginesetWebAppMapping in interface ServletEnginejrun.servlet.ServletEnginemapping - The new mapping to add
public void removeService(ServiceMBean service)
throws java.lang.Exception
removeService in interface ServicePartitionMBeanremoveService in class ServicePartitionpublic final void dispatch(ServletConnection connection)
dispatch in interface ServletEnginejrun.servlet.ServletEnginerequest - The HttpServletRequestresponse - The HttpServletResponsepublic java.util.Set getExpandedMappings()
ServletEnginegetExpandedMappings in interface ServletEnginepublic WebApplication findWebApplication(java.lang.String uri)
findWebApplication in interface ServletEnginejrun.servlet.ServletEngineuri - The request uri
protected WebApplication findWebApplication(java.lang.String host,
int port,
java.lang.String uri)
protected java.util.Set findMappingsByHost(java.lang.String host)
protected WebApplication findMatchingPrefix(java.util.Set maps,
java.lang.String uri)
public void setDefaultLocale(java.lang.String locale)
ServletEngineServiceMBeansetDefaultLocale in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanlocale - The new localepublic java.lang.String getDefaultLocale()
ServletEngineServiceMBeangetDefaultLocale in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanpublic void setMimeMapping(MimeMapping mapping)
ServletEngineServiceMBeansetMimeMapping in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanmapping - The new MIME mapping to addpublic java.lang.String getMimeType(java.lang.String name)
ServletEngineServiceMBeangetMimeType in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanname - The resource name
public void setMimeTypesPath(java.lang.String path)
throws java.lang.Exception
ServletEngineServiceMBeansetMimeTypesPath in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBeanpath - The relative path of the mime.types file.
protected void processMimeTypes(java.io.InputStream in)
throws java.lang.Exception
public java.lang.String getMimeTypesPath()
ServletEngineServiceMBeangetMimeTypesPath in interface ServletEngineServiceMBeanjrun.servlet.ServletEngineServiceMBean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||