public abstract class AbstractContainerService extends java.lang.Object implements ContainerService
ContainerService interface.
There should be no reference to any third-party servlet container from here.
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractContainerService.LocalInitializationEnvironment
A fake
LocalEnvironment implementation that is used during the
initialization of the Development AppServer. |
static interface |
AbstractContainerService.PortMappingProvider
Provider for the 'portMapping'.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PORT_MAPPING_PROVIDER_PROP |
| Constructor and Description |
|---|
AbstractContainerService() |
| Modifier and Type | Method and Description |
|---|---|
com.google.appengine.tools.development.LocalServerEnvironment |
configure(java.lang.String devAppServerVersion,
java.lang.String address,
int port,
com.google.appengine.tools.development.ApplicationConfigurationManager.ModuleConfigurationHandle moduleConfigurationHandle,
java.io.File externalResourceDir,
java.util.Map<java.lang.String,java.lang.Object> containerConfigProperties,
int instance,
DevAppServer devAppServer)
Sets up the necessary configuration parameters.
|
void |
createConnection()
Create's this containers network connections.
|
java.lang.String |
getAddress()
Returns the listener network address, however it's decided during
the servlet container deployment.
|
AppEngineWebXml |
getAppEngineWebXmlConfig()
Return the AppEngineWebXml configuration of this container
|
java.lang.String |
getHostName()
Returns the host name of the module instance, however it's decided during the
the servlet container deployment.
|
int |
getPort()
Returns the listener port number, however it's decided during the servlet
container deployment.
|
java.util.Map<java.lang.String,java.lang.String> |
getServiceProperties()
Get a set of properties to be passed to each service, based on the
AppEngineWebXml configuration.
|
static void |
installLocalInitializationEnvironment(AppEngineWebXml appEngineWebXml,
int instance,
int port,
int defaultModuleMainPort,
java.lang.String backendName,
int backendInstance,
java.util.Map<java.lang.String,java.lang.String> portMapping)
Sets up an
com.google.apphosting.api.ApiProxy.Environment for container
initialization. |
void |
setApiProxyDelegate(<any> apiProxyDelegate)
Sets the
com.google.apphosting.api.ApiProxy.Delegate. |
void |
shutdown()
Shuts down the servlet container.
|
void |
startup()
Starts up the servlet container.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforwardToServer, getAppContextpublic static final java.lang.String PORT_MAPPING_PROVIDER_PROP
public final com.google.appengine.tools.development.LocalServerEnvironment configure(java.lang.String devAppServerVersion,
java.lang.String address,
int port,
com.google.appengine.tools.development.ApplicationConfigurationManager.ModuleConfigurationHandle moduleConfigurationHandle,
java.io.File externalResourceDir,
java.util.Map<java.lang.String,java.lang.Object> containerConfigProperties,
int instance,
DevAppServer devAppServer)
ContainerServiceconfigure in interface ContainerServicedevAppServerVersion - Version of the devAppServer.address - The address on which the module instance will runport - The port to which the module instance will be bound. If 0, an
available port will be selected.moduleConfigurationHandle - Handle to access and reread the configuration.externalResourceDir - If not null, a resource directory external
to the applicationDirectory. This will be searched before
applicationDirectory when looking for resources.containerConfigProperties - Additional properties used in the
configuration of the specific container implementation. This map travels
across classloader boundaries, so all values in the map must be JRE
classes.instance - the 0 based instance number for this container's instance or
LocalEnvironment.MAIN_INSTANCE.public void setApiProxyDelegate(<any> apiProxyDelegate)
ContainerServicecom.google.apphosting.api.ApiProxy.Delegate.
Note that this provides access to the original delegate which was established by
the DevAppServer. Though this delegate is usually available by calling
the delegate can be changed by the application so
we keep this reference to the original.
setApiProxyDelegate in interface ContainerServicepublic final void createConnection()
throws java.lang.Exception
ContainerServiceContainerService.getAddress(), ContainerService.getPort() and getHostName return
correct values for this container.createConnection in interface ContainerServicejava.lang.Exceptionpublic final void startup()
throws java.lang.Exception
ContainerServicestartup in interface ContainerServicejava.lang.Exception - Any exception from the container will be rethrown as is.public final void shutdown()
throws java.lang.Exception
ContainerServiceshutdown in interface ContainerServicejava.lang.Exception - Any exception from the container will be rethrown as is.public java.util.Map<java.lang.String,java.lang.String> getServiceProperties()
ContainerServicegetServiceProperties in interface ContainerServicepublic java.lang.String getAddress()
ContainerServicegetAddress in interface ContainerServicepublic AppEngineWebXml getAppEngineWebXmlConfig()
ContainerServicegetAppEngineWebXmlConfig in interface ContainerServicepublic int getPort()
ContainerServicegetPort in interface ContainerServicepublic java.lang.String getHostName()
ContainerServicegetHostName in interface ContainerServicepublic static void installLocalInitializationEnvironment(AppEngineWebXml appEngineWebXml,
int instance,
int port,
int defaultModuleMainPort,
java.lang.String backendName,
int backendInstance,
java.util.Map<java.lang.String,java.lang.String> portMapping)
com.google.apphosting.api.ApiProxy.Environment for container
initialization.