org.apache.derby.impl.services.monitor
Class TopService

java.lang.Object
  extended byorg.apache.derby.impl.services.monitor.TopService

class TopService
extends java.lang.Object

A description of an instance of a module.


Field Summary
protected  boolean inShutdown
           
protected  ProtocolKey key
          The idenity of this service, note that it may not be active yet.
protected  java.util.Vector moduleInstances
           
protected  BaseMonitor monitor
           
protected  java.util.Hashtable protocolTable
          List of protocols.
(package private)  java.util.Locale serviceLocale
           
protected  PersistentService serviceType
          The type of service this was created by.
protected  ModuleInstance topModule
          The top module instance
 
Constructor Summary
(package private) TopService(BaseMonitor monitor)
           
(package private) TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, java.util.Locale serviceLocale)
           
 
Method Summary
private  boolean addToProtocol(ProtocolKey key, ModuleInstance module)
          Add a running module into the protocol hash table.
(package private)  java.lang.Object bootModule(boolean create, java.lang.Object service, ProtocolKey key, java.util.Properties properties)
          Boot a module, performs three steps.
protected  java.lang.Object findModule(ProtocolKey key, boolean findOnly, java.util.Properties properties)
          Find an module in the protocol table that supports the required protocol name combination and can handle the properties.
 ProtocolKey getKey()
           
protected  java.lang.Object getService()
           
(package private)  PersistentService getServiceType()
           
protected  boolean inService(java.lang.Object instance)
           
(package private)  boolean isActiveService()
           
(package private)  boolean isActiveService(ProtocolKey otherKey)
           
protected  boolean isPotentialService(ProtocolKey otherKey)
           
protected  void setTopModule(java.lang.Object instance)
           
(package private)  boolean shutdown()
          If the service is already beign shutdown we return false.
private static void stop(java.lang.Object instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected ProtocolKey key
The idenity of this service, note that it may not be active yet.


topModule

protected ModuleInstance topModule
The top module instance


protocolTable

protected java.util.Hashtable protocolTable
List of protocols.


moduleInstances

protected java.util.Vector moduleInstances

monitor

protected BaseMonitor monitor

inShutdown

protected boolean inShutdown

serviceType

protected PersistentService serviceType
The type of service this was created by. If null then this is a non-persistent service.


serviceLocale

java.util.Locale serviceLocale
Constructor Detail

TopService

TopService(BaseMonitor monitor)

TopService

TopService(BaseMonitor monitor,
           ProtocolKey key,
           PersistentService serviceType,
           java.util.Locale serviceLocale)
Method Detail

setTopModule

protected void setTopModule(java.lang.Object instance)

getService

protected java.lang.Object getService()

isPotentialService

protected boolean isPotentialService(ProtocolKey otherKey)

isActiveService

boolean isActiveService()

isActiveService

boolean isActiveService(ProtocolKey otherKey)

findModule

protected java.lang.Object findModule(ProtocolKey key,
                                      boolean findOnly,
                                      java.util.Properties properties)
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.


bootModule

java.lang.Object bootModule(boolean create,
                            java.lang.Object service,
                            ProtocolKey key,
                            java.util.Properties properties)
                      throws StandardException
Boot a module, performs three steps.
  1. Look for an existing module in the protocol table
  2. Look for a module in the implementation table that handles this protocol
  3. Create an instance that handles this protocol.

Throws:
StandardException

shutdown

boolean shutdown()
If the service is already beign shutdown we return false.


addToProtocol

private boolean addToProtocol(ProtocolKey key,
                              ModuleInstance module)
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

protected boolean inService(java.lang.Object instance)

getKey

public ProtocolKey getKey()

getServiceType

PersistentService getServiceType()

stop

private static void stop(java.lang.Object instance)

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.