public class NotifyServer extends NotifyService
NotifyServer runs a notification service for this host. Other
processes can use NotifyClients in order to show notifications
through this service.DARK_THEME, LIGHT_THEME, LISTENING_PORT| Constructor and Description |
|---|
NotifyServer() |
| Modifier and Type | Method and Description |
|---|---|
void |
postNotification(java.lang.String title,
java.lang.String message,
java.lang.Integer type,
java.lang.Integer align,
java.lang.Long timeout,
java.lang.String themeName)
Posts a new notification to the service, setting the parameters needed
for it.
|
void |
start()
Starts the service, in case it hasn't been started yet.
|
void |
stop()
Stops the service, in case it's running.
|
get, resetpublic void start()
NotifyServicestart in class NotifyServicepublic void postNotification(java.lang.String title,
java.lang.String message,
java.lang.Integer type,
java.lang.Integer align,
java.lang.Long timeout,
java.lang.String themeName)
NotifyServicepostNotification in class NotifyServicetitle - The title to display.message - The message to display.type - The notification type (0~7).align - The text/layout alignment (0,1).timeout - The maximum time in milliseconds the notification will
stay on screen.themeName - Either "light" or "dark", refering to the two stock
themes available.NotifyService.DARK_THEME,
NotifyService.LIGHT_THEMEpublic void stop()
NotifyServicestop in class NotifyService