|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.env.service.AbstractResinSubSystem
com.caucho.env.warning.WarningService
public class WarningService
The WarningService is a general way to send warning and critical system messages such as shutdown messages.
| Field Summary | |
|---|---|
static int |
START_PRIORITY
|
| Fields inherited from interface com.caucho.env.service.ResinSubSystem |
|---|
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER |
| Constructor Summary | |
|---|---|
WarningService()
|
|
| Method Summary | |
|---|---|
void |
addHandler(WarningHandler handler)
Add a warning event handler. |
void |
addPriorityHandler(WarningHandler handler)
Add a warning event handler. |
static WarningService |
createAndAddService()
|
static WarningService |
getCurrent()
|
int |
getStartPriority()
Returns the start priority of the service, used to determine which services to start first. |
static void |
sendCurrentWarning(java.lang.Object source,
java.lang.String msg)
Sends a warning to the current service. |
static void |
sendCurrentWarning(java.lang.Object source,
java.lang.Throwable e)
Sends a warning to the current service. |
void |
sendWarning(java.lang.Object source,
java.lang.String msg)
Send a warning message to any registered handlers. |
void |
sendWarning(java.lang.Object source,
java.lang.Throwable e)
Send a warning message to any registered handlers. |
| Methods inherited from class com.caucho.env.service.AbstractResinSubSystem |
|---|
destroy, getStopPriority, preCreate, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int START_PRIORITY
| Constructor Detail |
|---|
public WarningService()
| Method Detail |
|---|
public static WarningService createAndAddService()
public static WarningService getCurrent()
public void sendWarning(java.lang.Object source,
java.lang.String msg)
source - source of the message, usually youmsg - test to print or send as an alertisHighPriority - set true to send to high priority warning handlers
public void sendWarning(java.lang.Object source,
java.lang.Throwable e)
source - source of the message, usually youmsg - test to print or send as an alertisHighPriority - set true to send to high priority warning handlers
public static void sendCurrentWarning(java.lang.Object source,
java.lang.String msg)
public static void sendCurrentWarning(java.lang.Object source,
java.lang.Throwable e)
public void addHandler(WarningHandler handler)
handler - an object that implements WarningHandlerisHighPriority - high priority handlers only get high priority warnings.public void addPriorityHandler(WarningHandler handler)
handler - an object that implements WarningHandlerisHighPriority - high priority handlers only get high priority warnings.public int getStartPriority()
ResinSubSystem
getStartPriority in interface ResinSubSystemgetStartPriority in class AbstractResinSubSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||