|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_AccessFilter
This interface hides the real protocol used to check messages.
The interface may be used to filter messages on subscribe() or get() access. Only messages where the match() method returns true are sent via update() to the client
Note that you are not allowed to manipulate the content or XmlKey or QoS of a message with your plugin as this would affect all other subscribers (you are working on a reference to the original message).
The plugin with your filter rules must implement this interface.
Steps to add a new plugin:
Method Summary | |
---|---|
java.lang.String[] |
getMimeExtended()
Get the content MIME version number for which this plugin applies. |
java.lang.String[] |
getMimeTypes()
Get the content MIME types for which this plugin applies, "*" is for all mime types |
java.lang.String |
getName()
Get a human readable name of this filter implementation |
void |
initialize(ServerScope glob)
This is called after instantiation of the plugin |
boolean |
match(SessionInfo receiver,
MsgUnit msgUnit,
Query query)
Check if the filter rule matches for this message. |
void |
shutdown()
|
Method Detail |
---|
void initialize(ServerScope glob)
glob
- The Global handle of this xmlBlaster server instance.java.lang.String getName()
java.lang.String[] getMimeTypes()
java.lang.String[] getMimeExtended()
boolean match(SessionInfo receiver, MsgUnit msgUnit, Query query) throws XmlBlasterException
Note that you are not allowed to manipulate the content or XmlKey or QoS of a message with your plugin as this would affect all other subscribers (you are working on a reference to the original message). You can find out the publisher name like msgUnit.getQosData().getSender()
receiver
- The session object describing the receiver, is never null.msgUnit
- The message to check, is never null.query
- The query containing the filter rule on subscribe/get usually
the client defines his own rule which is passed here.XmlBlasterException
- Is thrown on problems, for example if the MIME type
does not fit to message content.void shutdown()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |