public class OpenBusEventHandler extends Object implements OpenBusEventHandlerInterface
| Constructor and Description |
|---|
OpenBusEventHandler()
Construtor padrão que se cadastra para receber e enviar evventos.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getClientInstanceId()
|
protected String |
getFatherClientInstanceId()
|
protected boolean |
isAnonymousId(String id)
Indica um id (destino ou origem) é anônimo.
|
protected boolean |
isEventFromFatherAndToMe(String sourceId,
String destId)
Indica se uma mensagem é endereçada diretamente entre um cliente pai que
disparou efetivamente o cliente corrente.
|
protected boolean |
isEventFromIdentifiedSourceAndToMe(String sourceId,
String destId)
Indica se uma mensagem é endereçada diretamente para o cliente corrente e
tem origem definida.
|
protected boolean |
isMyFatherId(String id)
Verifica se um id é correspondente ao meu cliente.
|
protected boolean |
isMyId(String id)
Verifica se um id é correspondente ao meu cliente.
|
void |
logReceivedEvent(boolean treated,
String sourceId,
String destId,
String type,
Object value)
Método redefinível para gerar log do tratador.
|
void |
logSentEvent(boolean treated,
String sourceId,
String destId,
String type,
Object value)
Método redefinível para gerar log do tratador.
|
boolean |
receiveEventWithBooleanValue(String sourceId,
String destId,
String type,
boolean booleanValue)
Recebe mensagem com valor booleano.
|
boolean |
receiveEventWithNoValue(String sourceId,
String destId,
String type)
Recebe mensagem sem valor
|
boolean |
receiveEventWithStringValue(String sourceId,
String destId,
String type,
String stringValue)
Recebe mensagem com valor string.
|
boolean |
sendEventWithBooleanValue(String sourceId,
String destId,
String type,
boolean booleanValue)
Envia mensagem com valor booleano.
|
boolean |
sendEventWithNoValue(String sourceId,
String destId,
String type)
Envia mensagem sem valor
|
boolean |
sendEventWithStringValue(String sourceId,
String destId,
String type,
String stringValue)
Envia mensagem com valor string.
|
public OpenBusEventHandler()
protected final String getClientInstanceId()
protected final String getFatherClientInstanceId()
protected final boolean isMyId(String id)
id - id a ser verificadoprotected final boolean isMyFatherId(String id)
id - id a ser verificadoprotected final boolean isAnonymousId(String id)
id - id a ser testado.protected final boolean isEventFromFatherAndToMe(String sourceId, String destId)
sourceId - id da origemdestId - id do destinoisMyId(String) Veja definição de:
isMyFatherId(String)protected final boolean isEventFromIdentifiedSourceAndToMe(String sourceId, String destId)
sourceId - id da origemdestId - id do destinoisMyId(String) e
isAnonymousId(String).public boolean receiveEventWithNoValue(String sourceId, String destId, String type)
receiveEventWithNoValue in interface OpenBusEventReceiverInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipopublic boolean receiveEventWithStringValue(String sourceId, String destId, String type, String stringValue)
receiveEventWithStringValue in interface OpenBusEventReceiverInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipostringValue - valor stringpublic boolean receiveEventWithBooleanValue(String sourceId, String destId, String type, boolean booleanValue)
receiveEventWithBooleanValue in interface OpenBusEventReceiverInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipobooleanValue - valor booleano.public final boolean sendEventWithNoValue(String sourceId, String destId, String type)
sendEventWithNoValue in interface OpenBusEventSenderInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipopublic final boolean sendEventWithStringValue(String sourceId, String destId, String type, String stringValue)
sendEventWithStringValue in interface OpenBusEventSenderInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipostringValue - valor stringpublic final boolean sendEventWithBooleanValue(String sourceId, String destId, String type, boolean booleanValue)
sendEventWithBooleanValue in interface OpenBusEventSenderInterfacesourceId - id do remetentedestId - id do destinatáriotype - tipobooleanValue - valor booleanopublic void logReceivedEvent(boolean treated,
String sourceId,
String destId,
String type,
Object value)
logReceivedEvent in interface OpenBusEventReceiverInterfacetreated - indicativo de tratamentosourceId - id da fonte.destId - id do destino.type - tipovalue - valorpublic void logSentEvent(boolean treated,
String sourceId,
String destId,
String type,
Object value)
logSentEvent in interface OpenBusEventSenderInterfacetreated - indicativo de tratamentosourceId - id da fonte.destId - id do destino.type - tipovalue - valorCopyright © 2019. All rights reserved.