public abstract class

MessageHandler

extends Object
java.lang.Object
   ↳ edu.stanford.junction.api.messaging.MessageHandler
Known Direct Subclasses

Summary

Public Constructors
MessageHandler()
Public Methods
abstract void onMessageReceived(MessageHeader header, JSONObject message)
Message handling
List<String> supportedActors()
List<String> supportedChannels()
List<String> supportedRoles()
Stream-selecting filters; These filters allow Junction to route messages using the network's capabilities.
boolean supportsMessage(JSONObject message)
Message-level filter These filters may be convenient for the end-user.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MessageHandler ()

Public Methods

public abstract void onMessageReceived (MessageHeader header, JSONObject message)

Message handling

public List<String> supportedActors ()

public List<String> supportedChannels ()

public List<String> supportedRoles ()

Stream-selecting filters; These filters allow Junction to route messages using the network's capabilities. If we are sending to a fixed actor, try and establish a direct connection. If we are sending to a fixed role or multiple actors, we can potentially multicast. These methods should return static results (list of actors does not change over the lifetime of the handler)

public boolean supportsMessage (JSONObject message)

Message-level filter These filters may be convenient for the end-user. May be useful to support RPC, for example