public class NotificationService extends Service implements csbase.remote.NotificationServiceInterface, csbase.remote.RemoteObserverNotifierInterface
NotificationService implementa o serviço de notificação
de mensagens.| Modifier | Constructor and Description |
|---|---|
protected |
NotificationService()
Construtor do serviço.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(csbase.remote.RemoteObserver observer,
java.lang.Object userId)
Registra um observador remoto de notificação.
|
static void |
createService()
Constrói a instância do serviço.
|
boolean |
deleteObserver(csbase.remote.RemoteObserver observer,
java.lang.Object userId)
Deregistra um observador
|
static NotificationService |
getInstance()
Busca da instância de
NotificationService. |
protected boolean |
has2Update(java.lang.Object arg,
java.lang.Object event) |
void |
initService()
Inicialização do serviço.
|
void |
notifyTo(java.lang.Object[] userIds,
csbase.logic.Notification notification)
Método para notificação que recebe o Notification pronto.
|
void |
notifyTo(java.lang.Object[] userIds,
java.lang.String content,
boolean mustPopUp,
boolean volFlag) |
void |
shutdownService()
Término do serviço.
|
getBooleanProperty, getDefaultLocale, getDoubleProperty, getExternalPropertyFile, getFormattedString, getFormattedString, getInitializationDependencies, getInstance, getIntProperty, getKey, getLongProperty, getName, getOptionalString, getOptionalString, getOSPropertyPath, getSenderName, getServices, getString, getString, getStringListProperty, getStringProperty, getSystemId, getThreadLocale, getUser, getUserPermission, hasProperty, incrCounter, isActive, isEnabled, isInternalServerRequest, isLoggingNotifications, isPropertyNull, logNotification, setEnabled, setKey, setSystemId, setUserIdhandleException, handleFatalErrorcountObservers, deleteObserver, deleteObservers, has2update, notifyObserversclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected NotificationService()
throws ServerException
ServerException - em caso de falha na construção do serviço.public static NotificationService getInstance()
NotificationService.NotificationService,
NotificationServiceInterface.SERVICE_NAMEpublic final void addObserver(csbase.remote.RemoteObserver observer,
java.lang.Object userId)
addObserver in interface csbase.remote.RemoteObservableaddObserver in class csbase.remote.RemoteObjectObservableobserver - O observador remoto que registra este interesse.userId - identificador do usuário de interesse.protected final boolean has2Update(java.lang.Object arg,
java.lang.Object event)
has2Update in class csbase.remote.RemoteObjectObservablepublic final boolean deleteObserver(csbase.remote.RemoteObserver observer,
java.lang.Object userId)
deleteObserver in interface csbase.remote.RemoteObservabledeleteObserver in class csbase.remote.RemoteObjectObservableobserver - O observador remoto a ser deregistrado.userId - identificador do usuário de interesse.public final void initService()
throws ServerException
initService in class ServiceServerException - se ocorrer um erro na inicialização.public final void notifyTo(java.lang.Object[] userIds,
java.lang.String content,
boolean mustPopUp,
boolean volFlag)
notifyTo in interface csbase.remote.NotificationServiceInterfacepublic void notifyTo(java.lang.Object[] userIds,
csbase.logic.Notification notification)
userIds - Lista de usuários destinatários, ou null para todos os
usuários.notification - Informações da notificação a ser enviada.public final void shutdownService()
shutdownService in class Servicepublic static void createService()
throws ServerException
ServerException - se houver falha no servidor.NotificationServiceCopyright © 2016. All Rights Reserved.