Class TopService
java.lang.Object
org.apache.derby.impl.services.monitor.TopService
A description of an instance of a module.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) ProtocolKeyThe idenity of this service, note that it may not be active yet.(package private) Vector<ModuleInstance> (package private) BaseMonitor(package private) Hashtable<ProtocolKey, ModuleInstance> List of protocols.(package private) Locale(package private) PersistentServiceThe type of service this was created by.(package private) ModuleInstanceThe top module instance -
Constructor Summary
ConstructorsConstructorDescriptionTopService(BaseMonitor monitor) TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanaddToProtocol(ProtocolKey key, ModuleInstance module) Add a running module into the protocol hash table.(package private) ObjectbootModule(boolean create, Object service, ProtocolKey key, Properties properties) Boot a module, performs three steps.(package private) ObjectfindModule(ProtocolKey key, boolean findOnly, Properties properties) Find an module in the protocol table that supports the required protocol name combination and can handle the properties.private ModuleInstancefindModuleInstance(Object instance) Find aModuleInstanceobject whosegetInstance()method returns the object specified by theinstanceparameter.getKey()(package private) Object(package private) PersistentService(package private) boolean(package private) boolean(package private) booleanisActiveService(ProtocolKey otherKey) (package private) booleanisPotentialService(ProtocolKey otherKey) (package private) voidsetTopModule(Object instance) (package private) booleanshutdown()If the service is already beign shutdown we return false.private static void
-
Field Details
-
key
ProtocolKey keyThe idenity of this service, note that it may not be active yet. -
topModule
ModuleInstance topModuleThe top module instance -
protocolTable
Hashtable<ProtocolKey, ModuleInstance> protocolTableList of protocols. -
moduleInstances
Vector<ModuleInstance> moduleInstances -
monitor
BaseMonitor monitor -
inShutdown
boolean inShutdown -
serviceType
PersistentService serviceTypeThe type of service this was created by. If null then this is a non-persistent service. -
serviceLocale
Locale serviceLocale
-
-
Constructor Details
-
TopService
TopService(BaseMonitor monitor) -
TopService
TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale)
-
-
Method Details
-
setTopModule
-
getService
Object getService() -
isPotentialService
-
isActiveService
boolean isActiveService() -
isActiveService
-
findModule
Find an module in the protocol table that supports the required protocol name combination and can handle the properties. Returns the instance of the module or null if one does not exist in the protocol table. -
findModuleInstance
Find aModuleInstanceobject whosegetInstance()method returns the object specified by theinstanceparameter.- Parameters:
instance- the instance to look for- Returns:
- a
ModuleInstanceobject, ornullif no match was found
-
bootModule
Object bootModule(boolean create, Object service, ProtocolKey key, Properties properties) throws StandardException Boot a module, performs three steps.- Look for an existing module in the protocol table
- Look for a module in the implementation table that handles this protocol
- Create an instance that handles this protocol.
- Throws:
StandardException
-
shutdown
boolean shutdown()If the service is already beign shutdown we return false. -
addToProtocol
Add a running module into the protocol hash table. Return true if the module was added successfully, false if it couldn't be added. In the latter case the module should be shutdown if its reference count is 0. -
inService
-
getKey
-
getServiceType
PersistentService getServiceType() -
stop
-