public interface ServiceEnvironment
Modifier and Type | Method and Description |
---|---|
void |
cancel()
A service uses this method to signal that it has been canceled (i.e., the
socket is closed).
|
boolean |
isCancelled()
Provides the information about the state of the environment.
|
void |
log(java.lang.String message)
A service uses this method to log messages in the environment.
|
void |
log(java.lang.String message,
Logger.MessageLevel level)
A service uses this method to log messages in the environment.
|
void |
log(java.lang.Throwable t)
A service uses this method to log occurrence of an exception in the
environment.
|
void |
stillAlive()
While listening on its socket, a service will regularly invoke this
method.
|
boolean isCancelled()
void log(java.lang.String message, Logger.MessageLevel level)
message
- is the message that should be loggedlevel
- is the type of messagevoid log(java.lang.String message)
message
- is the message that should be loggedvoid log(java.lang.Throwable t)
t
- is the exception that occurred and should be loggedvoid stillAlive()
void cancel()