|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.deegree.portal.owswatch.ServiceWatcher
public class ServiceWatcher
Mail class of this framework. Its called upon starting tomcat to start watching services and test them regularly according to their test intervals and logs the result through its service invoker
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ServiceWatcher()
|
Method Summary | |
---|---|
protected void |
addActiveService(ServiceConfiguration service)
Adds an active service to the list of active services. |
void |
addService(ServiceConfiguration service,
ServiceLog servicelog)
adds a new Service to the ServiceList |
void |
compileDownTimeReport(java.lang.String webinfPath,
OwsWatchConfig conf)
This function is called on starting tomcat. |
boolean |
containsService(int serviceId)
|
protected java.lang.String |
createDownTimeReportBody(java.util.Hashtable<java.lang.Integer,java.lang.String> missedTests)
Create the content of the down time time report |
void |
execute(int serviceId)
executes the given service one time in the main thread |
ServiceConfiguration |
getService(int serviceId)
returns the service identified by its Id in the serviceList |
java.util.List<ServiceConfiguration> |
getServiceList()
returns list of services being watched |
java.util.Map<ServiceConfiguration,ServiceLog> |
getServiceLogs()
|
java.util.Map<java.lang.Integer,ServiceConfiguration> |
getServices()
|
boolean |
isThreadsuspended()
|
void |
refreshAllServices()
RefreshAllServices executes all the requests in the active monitors, and subtract the time from those who are waiting in line and restarts the time for those who had a turn This is the default to be called during the regular tests. |
ServiceConfiguration |
removeService(int serviceId)
removes the service identify by -id- from the ServiceList |
void |
run()
|
void |
setThreadsuspended(boolean threadsuspended)
|
void |
startServiceConfiguration(int serviceId)
This method will set the threadSuspended vaiable to false in order for the id-th service to restart sending requests |
void |
stopServiceConfiguration(int serviceId)
This method will set the threadSuspended vaiable to true in order for the id-th service to stop sending GetCapabilities requests |
protected void |
writeAndSendTimeDownEmail(java.util.Hashtable<java.lang.Integer,java.lang.String> missedTests,
OwsWatchConfig conf)
Authors the down time report and sends it to the designated users |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServiceWatcher()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void addService(ServiceConfiguration service, ServiceLog servicelog)
service
- servicelog
- protected void addActiveService(ServiceConfiguration service)
service
- public ServiceConfiguration getService(int serviceId)
serviceId
-
public ServiceConfiguration removeService(int serviceId)
serviceId
-
public void stopServiceConfiguration(int serviceId)
serviceId
- public void startServiceConfiguration(int serviceId)
serviceId
- public boolean containsService(int serviceId)
serviceId
-
public java.util.List<ServiceConfiguration> getServiceList()
public void refreshAllServices()
public void execute(int serviceId)
serviceId
- public void compileDownTimeReport(java.lang.String webinfPath, OwsWatchConfig conf)
webinfPath
- WEB-INF folder pathconf
- owsWatch configuration instanceprotected void writeAndSendTimeDownEmail(java.util.Hashtable<java.lang.Integer,java.lang.String> missedTests, OwsWatchConfig conf)
missedTests
- a hastable containing the missed testsconf
- owsWatchConfigurationprotected java.lang.String createDownTimeReportBody(java.util.Hashtable<java.lang.Integer,java.lang.String> missedTests)
missedTests
-
public java.util.Map<java.lang.Integer,ServiceConfiguration> getServices()
public java.util.Map<ServiceConfiguration,ServiceLog> getServiceLogs()
public boolean isThreadsuspended()
public void setThreadsuspended(boolean threadsuspended)
threadsuspended
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org