public class NotifyServer extends NotifyService
NotifyServer
runs a notification service for this host. Other
processes can use NotifyClient
s 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, reset
public void start()
NotifyService
start
in class NotifyService
public 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)
NotifyService
postNotification
in class NotifyService
title
- 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_THEME
public void stop()
NotifyService
stop
in class NotifyService