|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object janus.web.config.PropertyConfig janus.web.service.Service
public abstract class Service
Basisklasse für ServerDienste.
Field Summary | |
---|---|
protected boolean |
active
Sind wir aktiv? |
protected boolean |
debug
Debugging |
protected PrintWriter |
debugStream
PrintWriter für die Debug-Ausgaben |
static boolean |
DEFAULT_ACTIVE
Default rür active |
static boolean |
DEFAULT_DEBUG
Default rür debug |
static String |
DEFAULT_PACKAGE
Default Package janus.web.service |
protected Logger |
errorlog
Error-Logging |
protected Logger |
log
Logging |
protected String |
status
Status |
protected String |
toStringParameters
Parameter für toString() |
static String |
TRACE
Logger für Traces |
Fields inherited from class janus.web.config.PropertyConfig |
---|
prefix, props |
Constructor Summary | |
---|---|
Service()
|
Method Summary | |
---|---|
static Service |
create(String name,
Properties props)
Factory - Erzeugt ein passendes Objekt und initialisiert es. |
PrintWriter |
getDebugStream()
Ermittle den Debugging-Stream |
String |
getName()
Gebe den Namen zuück. |
String |
getStatus()
Aktueller Status |
String |
getTraceName()
Ermittle den Namen des Trace-Loggers |
void |
handleException(Throwable t)
Exception Handler |
protected void |
init(Properties props,
Class clazz)
Initialisierung aus den Properties. |
boolean |
isActive()
Sind wir aktiv? |
boolean |
isDebug()
Ermittle das Debugging-Flag |
protected void |
setField(Field f,
Object val)
Helper um ein Feld zu setzen. |
protected void |
setToStringParameters(String param)
Setze die Paramter für toString() |
void |
setTraceName(String traceName)
Setze den Namen des Trace-Loggers |
abstract void |
start()
Starte den Service |
abstract void |
stop()
Stoppe den Service |
String |
toString()
String-Ausgabe |
Methods inherited from class janus.web.config.PropertyConfig |
---|
convertProperties, getBooleanProperty, getBooleanProperty, getBooleanPropertyArray, getBooleanPropertyArray, getIntProperty, getIntProperty, getIntPropertyArray, getIntPropertyArray, getLogger, getPrefix, getProperties, getProperty, getProperty, getPropertyArray, getPropertyArray, init, readFile, setPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean active
protected boolean debug
protected PrintWriter debugStream
public static final boolean DEFAULT_ACTIVE
active
public static final boolean DEFAULT_DEBUG
debug
public static final String DEFAULT_PACKAGE
protected Logger errorlog
protected Logger log
protected String status
protected String toStringParameters
toString()
public static final String TRACE
Constructor Detail |
---|
public Service()
Method Detail |
---|
public static Service create(String name, Properties props) throws Throwable
name
- Name des Serviceprops
- Properties für die Konfiguration
Throwable
- - Erzeugung nicht möglichpublic PrintWriter getDebugStream()
public String getName()
public String getStatus()
public String getTraceName()
public void handleException(Throwable t)
handleException
in interface ExceptionListener
t
- Exception, die in Error-Log sollprotected void init(Properties props, Class clazz) throws IllegalAccessException
init
in class PropertyConfig
props
- Konfigurationsdatenclazz
- die eigene Klasse
IllegalAccessException
public boolean isActive()
public boolean isDebug()
protected void setField(Field f, Object val) throws IllegalAccessException
setField
in class PropertyConfig
IllegalAccessException
PropertyConfig.setField(java.lang.reflect.Field, java.lang.Object)
protected void setToStringParameters(String param)
toString()
public void setTraceName(String traceName)
traceName
- Eintrag in Log4j-Konfigurationpublic abstract void start() throws Throwable
Throwable
public abstract void stop() throws Throwable
Throwable
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |