Oracle Fusion Middleware User Messaging Service 11.1.1.1.0 Java API Reference
E14011-01

oracle.sdp.messaging.filter
Class MessageFilterFactory

java.lang.Object
  extended by oracle.sdp.messaging.filter.MessageFilterFactory

public class MessageFilterFactory
extends java.lang.Object

Factory class to create MessageFilter objects


Constructor Summary
MessageFilterFactory()
           
 
Method Summary
static MessageFilter createBlacklistFilter(java.lang.String pattern)
          Create a "blacklist" filter.
static MessageFilter createMessageFilter(java.lang.String pattern, MessageFilter.FieldType field, java.lang.String fieldName, MessageFilter.Action action)
          Create a new MessageFilter.
static MessageFilter createWhitelistFilter(java.lang.String pattern)
          Create a "whitelist" filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageFilterFactory

public MessageFilterFactory()
Method Detail

createBlacklistFilter

public static MessageFilter createBlacklistFilter(java.lang.String pattern)
Create a "blacklist" filter. Matches against an incoming message's sender address, and rejects the message if the sender matches the given pattern. As above, the pattern should be a Java Pattern.


createMessageFilter

public static MessageFilter createMessageFilter(java.lang.String pattern,
                                                MessageFilter.FieldType field,
                                                java.lang.String fieldName,
                                                MessageFilter.Action action)
Create a new MessageFilter.

Parameters:
pattern - The pattern to match the incoming message against. The pattern should be a Java Pattern. For example:
To match the substring "foo" anywhere within the specified field, the correct pattern is .*foo.*
To match a field starting with foo, the correct pattern is ^foo.*
field - The part of the message to match against.
fieldName - If "field" is HEADER or METADATA, this parameter determines which header or metadata entry to match against.
action - The action to take if the filter and message match. The action is taken immediately, so no further filters will be processed.

createWhitelistFilter

public static MessageFilter createWhitelistFilter(java.lang.String pattern)
Create a "whitelist" filter. Matches against an incoming message's sender address, and accepts the message if the sender matches the given pattern.


Oracle Fusion Middleware User Messaging Service 11.1.1.1.0 Java API Reference
E14011-01

Copyright © 2009 Oracle and/or its affiliates. All rights reserved.