|
soap tutorial | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectadriani.jws.template.service.GeneralService
public abstract class GeneralService
The parent class for all the classes implementing the service business logic: ServiceLogic
and ServiceMacro
. At the moment this class offers following features for a general
web service class:
Field Summary | |
---|---|
protected static LoggerManager |
benchLogger
Reference to the benchLogger created in the static code block. |
protected static java.lang.String |
leadingName
Beginning of each logging message produced by this class. |
protected static WSLogger |
logger
Logger instance for this class (static): must be set after WSLogger initialization. |
protected static GeneralAnalyzer |
serviceAnalyzer
Reference to the serviceAnalyzer created in the static code block. |
Constructor Summary | |
---|---|
GeneralService()
Stateless constructor. |
Method Summary | |
---|---|
boolean |
compareSB(java.lang.StringBuffer first,
java.lang.StringBuffer second)
Helper method. |
void |
delay(long time)
Stops this thread for few milliseconds. |
void |
finalize()
Method useful for debug and testing, the verify the scope of the web service objects. |
static java.lang.StringBuffer |
getCommandsList()
Produce a short description list for remote manager commands accepted by the web service when the MANAGER feature is activated. |
GeneralAnalyzer |
getServiceAnalyzer()
Return the GeneralAnalyzer object, used during development or benchmark testing to
collect statistical data about the service's performances. |
static java.util.ResourceBundle |
loadBundle()
Load the resource bundle identified by the Settings.CONFIG static field. |
static void |
loadProperties()
Load data from the resource bundle into the proper static fields. |
void |
logIntrospection()
PLACE HOLDER: not used at the moment (sample code). |
protected void |
manageService(int key)
Allow to configure the service dynamically, without reloading the AAR package on the application server. |
protected abstract void |
showConfiguration()
Prints in the LOG file some information about the service configuration. |
protected void |
showJavaProperties()
Prints in the LOG file (or on STDOUT, if enable) all the Java properties set at run time. |
protected void |
showRuntime()
Deprecated. use the showJavaProperties() method instead, because it return the list of
all Java properties |
protected int |
valueOfString(java.lang.String string,
int no_value)
Parse the string value of the input String into an integer value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static GeneralAnalyzer serviceAnalyzer
serviceAnalyzer
created in the static code block.
This object MUST BE static to ensure that all the subclasses of the GeneralService
class
do refer to the same analyzer.
protected static LoggerManager benchLogger
benchLogger
created in the static code block.
The benchLogger
logs on file single detailed information about the SQL execution times, this
is different from the serviceAnalyzer
object, which collects only global and statistical data.
SystemLogger
class.
protected static WSLogger logger
logger
is set in the static
code-bloc below.
protected static java.lang.String leadingName
Constructor Detail |
---|
public GeneralService()
Method Detail |
---|
public void finalize()
finalize
in class java.lang.Object
public static void loadProperties()
static
code-block defined in this very class.getBundle()
method: in this way we allow all other classes to load the bundle exactly with the same criteria.
public static java.util.ResourceBundle loadBundle()
Settings.CONFIG
static field.
If an error occurs we can not log the error on the log system, since we failed to acknowledge the logger configuration
(which is depicted in the configuration file we failed to load).
ResourceBundle
matching the Settings.CONFIG
static field (if found),
null otherwisepublic GeneralAnalyzer getServiceAnalyzer()
GeneralAnalyzer
object, used during development or benchmark testing to
collect statistical data about the service's performances.
GeneralAnalyzer
objectprotected abstract void showConfiguration()
ServiceLogic
or ServiceMacro
subclass to implement this method in order
to show the actual service configuration.
protected void manageService(int key)
ServiceAnalyzer
class.Settings.ANALYZE
flag on/off.Settings.VERBOSE
flag on/off.Settings.DEBUG
flag on/off.Settings.MANAGER
flag on/off.Settings.BENCH
flag on/off (and open/close the related logger).
key
- the integer command code as described aboveServiceLogic.command_pwd
,
ServiceLogic.manageService(WrapperIn input)
,
WrapperInformationIn.getCommand()
protected void showJavaProperties()
public static java.lang.StringBuffer getCommandsList()
OutputStream
object (usually STDOUT).
public void delay(long time)
time
- the time (in milliseconds) that this thread must be stoppedprotected int valueOfString(java.lang.String string, int no_value)
String
into an integer value.
The no_value
parameter represent the default integer value to be returned if
the parsing is not succesfull.
string
- the input string objectno_value
- the int value to be returned if conversion fails
no_value
number)public boolean compareSB(java.lang.StringBuffer first, java.lang.StringBuffer second)
first
- a StringBuffer
objectsecond
- another StringBuffer
object
true
if the two string object contains the same textpublic void logIntrospection()
protected void showRuntime()
showJavaProperties()
method instead, because it return the list of
all Java properties
|
Build 18/09/2012 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |