public class DefaultBroadcastService extends Object implements BroadcastService
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultBroadcastService.MethodBroadcastListener
Inner class to connect this service to all broadcast methods.
|
protected static class |
DefaultBroadcastService.MethodWrapper |
| Modifier and Type | Field and Description |
|---|---|
static int |
CUR_VERSION
stores the current platform version encoded as integer currently: 4.1.1.0
|
| Constructor and Description |
|---|
DefaultBroadcastService(BroadcastServiceConfiguration cfg) |
public static final int CUR_VERSION
public DefaultBroadcastService(BroadcastServiceConfiguration cfg)
public static DefaultBroadcastService getInstance()
protected String getStartupInfo()
protected void updateNodeIDsFromDatabase()
protected ExecutorService createMessageSendingExecutorService()
protected ExecutorService getMessageSendingExecutorService()
public long getDynamicClusterNodeID()
BroadcastServicegetDynamicClusterNodeID in interface BroadcastServicepublic Set<String> getBroadcastMethodNames()
BroadcastServicegetBroadcastMethodNames in interface BroadcastServicepublic BroadcastMethod getBroadcastMethod(String name)
BroadcastServicegetBroadcastMethod in interface BroadcastServiceprotected List<DefaultBroadcastService.MethodWrapper> getMethods()
public void initMethods()
protected void startPingHandler()
protected List<DefaultBroadcastService.MethodWrapper> loadMethods()
protected List<DefaultBroadcastService.MethodWrapper> loadLoopbackMethods()
protected List<DefaultBroadcastService.MethodWrapper> loadConfiguredMethods()
protected DefaultBroadcastService.MethodWrapper createMethod(String name, Class clazz)
public void registerBroadcastListener(BroadcastMessageListener listener, boolean remoteMessagesOnly)
BroadcastServiceregisterBroadcastListener in interface BroadcastServicepublic void unregisterBroadcastListener(BroadcastMessageListener listener)
BroadcastServiceunregisterBroadcastListener in interface BroadcastServicepublic long getClusterIslandPK()
public int getClusterNodeID()
public boolean isClusteringEnabled()
public void addTransportData(RawMessage message)
public void send(RawMessage message)
BroadcastServicesend in interface BroadcastServiceprotected void sendSynchronously(DefaultBroadcastService.MethodWrapper methodWrapper, RawMessage message)
methodWrapper - the method wrappermessage - the message to sendprotected void sendAsnychronously(DefaultBroadcastService.MethodWrapper methodWrapper, RawMessage message, Tenant currentTenant, ExecutorService executorService) throws RejectedExecutionException
methodWrapper - the method wrappermessage - the messagecurrentTenant - the current tenant to be used when sendingexecutorService - the executor serviceRejectedExecutionExceptionpublic boolean accept(RawMessage message)
Currently only message from other cluster nodes (determined by their dynamic node ID) and the same cluster island PK are accepted.
accept in interface BroadcastServicemessage - the message to checkprotected boolean isDuplicateMessage(RawMessage message)
protected boolean isLocal(RawMessage message)
protected void processMessageFromMethod(RawMessage message, String methodName)
public void destroy()
Copyright © 2017 SAP SE. All Rights Reserved.