Class AbstractModule<I extends InstanceHolder>
java.lang.Object
com.google.appengine.tools.development.AbstractModule<I>
- Type Parameters:
I- AnInstanceHoldertype which is available to a Module implementation but not reflected in theModuleinterface.
- All Implemented Interfaces:
Module
- Direct Known Subclasses:
BasicModule,ManualModule
Abstract super class for
Module implementations.-
Method Summary
Modifier and TypeMethodDescriptionfinal voidConfigure thisModule.voidCreates the network connections for thisModule.Acquires a serving permit and returns anInstanceHolderfor an instance which is available to handle a request or returns null if there is no such instance.getHostAndPort(int instance) Returns the host and port for the requested instance or null if the instance does not exist.getInstanceHolder(int instance) Returns the requestedInstanceHolderor null if the instance does not exist.Returns theLocalServerEnvironmentfor the primary instance for thisModule.Returns theContainerServicefor the primary instance for thisModule.Returns the module name for thisModule.voidsetApiProxyDelegate(ApiProxy.Delegate<?> apiProxyDelegate) Sets theApiProxy.Delegate.voidshutdown()Stops all the instances for thisModule.voidSimulates starting the module in production.voidstartup()Starts all the instances for thisModule.voidSimulates stopping the module in production.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.appengine.tools.development.Module
getInstanceCount
-
Method Details
-
getModuleName
Description copied from interface:ModuleReturns the module name for thisModule.- Specified by:
getModuleNamein interfaceModule
-
getLocalServerEnvironment
Description copied from interface:ModuleReturns theLocalServerEnvironmentfor the primary instance for thisModule.- Specified by:
getLocalServerEnvironmentin interfaceModule
-
configure
Description copied from interface:ModuleConfigure thisModule.Note
Module.configure(java.util.Map<java.lang.String, java.lang.Object>)fits into theDevAppServerstartup sequence. The user may adjustDevAppServer.setServiceProperties(java.util.Map<java.lang.String, java.lang.String>)values after construction and before callingDevAppServer.start()which callsModule.configure(java.util.Map<java.lang.String, java.lang.Object>). To retain compatibility operations that make use of these user specified settings such as port selection must not not be performed during construction. -
createConnection
Description copied from interface:ModuleCreates the network connections for thisModule.- Specified by:
createConnectionin interfaceModule- Throws:
Exception
-
setApiProxyDelegate
Description copied from interface:ModuleSets theApiProxy.Delegate.- Specified by:
setApiProxyDelegatein interfaceModule
-
startup
Description copied from interface:Module -
getHostAndPort
Description copied from interface:ModuleReturns the host and port for the requested instance or null if the instance does not exist.- Specified by:
getHostAndPortin interfaceModule- Parameters:
instance- The instance number orLocalEnvironment.MAIN_INSTANCE.
-
getInstanceHolder
Description copied from interface:ModuleReturns the requestedInstanceHolderor null if the instance does not exist.- Specified by:
getInstanceHolderin interfaceModule- Parameters:
instance- the instance number orLocalEnvironment.MAIN_INSTANCE.
-
shutdown
Description copied from interface:Module -
getMainContainer
Description copied from interface:ModuleReturns theContainerServicefor the primary instance for thisModule.- Specified by:
getMainContainerin interfaceModule
-
getAndReserveAvailableInstanceHolder
Description copied from interface:ModuleAcquires a serving permit and returns anInstanceHolderfor an instance which is available to handle a request or returns null if there is no such instance.throws
UnsupportedOperationExceptionunless this is aManualModule.- Specified by:
getAndReserveAvailableInstanceHolderin interfaceModule
-
startServing
Description copied from interface:ModuleSimulates starting the module in production.- Specified by:
startServingin interfaceModule- Throws:
Exception
-
stopServing
Description copied from interface:ModuleSimulates stopping the module in production.- Specified by:
stopServingin interfaceModule- Throws:
Exception
-