Package net.sf.eBus.config
Class EConfigure.McastNotifyConfig
- java.lang.Object
-
- net.sf.eBus.config.EConfigure.McastNotifyConfig
-
- All Implemented Interfaces:
Comparable<EConfigure.McastNotifyConfig>
- Enclosing class:
- EConfigure
public static final class EConfigure.McastNotifyConfig extends Object implements Comparable<EConfigure.McastNotifyConfig>
Contains the notification message class and subject(s) which defines the messages either published by aEConfigure.MulticastConnectionor subscribed to. Subjects are defined either as a list containing one or more subjects or as a subject query pattern. A subject list is fixed and new subjects may not be added to subject list once the multicast connection is created. Subject query patterns may be either fixed or dynamic. If fixed, then the pattern is matched against existing subjects when the multicast connection is created and the matching subjects remain unchanged afterwards. If dynamic, then new subjects are compared with the subject query and, if the new subject matches the query, is added to the multicast feed.JSON propertie used to configure a multicast notification are:
Multicast Feed JSON Properties Property Required? Type Default Description multifeedTypeYes EConfigure.MultifeedTypeNA A multifeed notification feed type is either list or query. messageClassYes ClassNA ENotificationMessagesubclass name.subjectListYes if multifeedTypeisEConfigure.MultifeedType.LISTArray of StringNA Non-empty list of notification subjects. subjectQueryYes if multifeedTypeisEConfigure.MultifeedType.QUERYStringNA Regular expression queryused to select notification subjects.isDynamicYes if multifeedTypeisEConfigure.MultifeedType.QUERYbooleanNA trueif query is applied to newly added subjects andfalseif query is used only once on multicast connection start.Example multicast configuration configuration - query.
multifeedType : QUERY messageClass : "net.sf.eBus.client.EquityTradeMessage" subjectQuery : "[A-M].+" isDynamic : trueExample multicast configuration configuration - list.
multifeedType : LIST messageClass : "net.sf.eBus.client.TopOfBookMessage" subjectList : [ "ABC", "DEF", "GHI", "XYZ" ]
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(EConfigure.McastNotifyConfig o)booleanequals(Object o)EConfigure.MultifeedTypefeedType()Returns multi-feed type.inthashCode()booleanisDynamic()Returnstrueif this is a dynamic query multi-feed.StringmessageClass()Returns message class.List<String>subjectList()Returns subject list.PatternsubjectQuery()Returns notification subject query.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(EConfigure.McastNotifyConfig o)
- Specified by:
compareToin interfaceComparable<EConfigure.McastNotifyConfig>
-
feedType
public EConfigure.MultifeedType feedType()
Returns multi-feed type.- Returns:
- multi-feed type.
-
messageClass
public String messageClass()
Returns message class.- Returns:
- message class.
-
subjectQuery
public Pattern subjectQuery()
- Returns:
- subject query.
-
isDynamic
public boolean isDynamic()
Returnstrueif this is a dynamic query multi-feed.- Returns:
- dynamic query multi-feed flag.
-
-