org.ocap.application
Class AppPattern

java.lang.Object
  extended by org.ocap.application.AppPattern

public class AppPattern
extends java.lang.Object

AppPattern is an element that constitutes an AppFilter. An AppPattern has the following attributes:

idPattern specifies an AppID group with a String: a pair of ranges for Organization IDs and Application IDs. The syntax is:

"oid1[-oid2][:aid1[-aid2]]"

See AppFilter for the examples.

See Also:
AppFilter, AppFilterHandler

Field Summary
static int ALLOW
          When AppFilter.accept finds a matching AppPattern with this action, it returns true.
static int ASK
          When AppFilter.accept finds a matching AppPattern with this action, it asks AppFilterHandler.accept for the decision.
static int DENY
          When AppFilter.accept finds a matching AppPattern with this action, it returns false.
 
Constructor Summary
AppPattern(java.lang.String idPattern, int action, int priority)
          Constructs a new AppPattern with no expiration.
AppPattern(java.lang.String idPattern, int action, int priority, java.util.Date expirationTime, java.lang.Object info)
          Constructs a new AppPattern with an expiration time and MSO private information.
 
Method Summary
 boolean equals(java.lang.Object that)
          Indicates whether some other object is "equal to" this one.
 int getAction()
          Returns the action associated with this AppPattern.
 java.lang.String getAppIDPattern()
          Returns the pattern string that specifies a group of AppIDs.
 java.util.Date getExpirationTime()
          Returns the time for this AppPattern to expire or null if it never expires.
 int getPriority()
          Returns the search order priority of this AppPattern.
 java.lang.Object getPrivateInfo()
          Returns MSO-private information of this AppPattern.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW

public static final int ALLOW
When AppFilter.accept finds a matching AppPattern with this action, it returns true.

See Also:
AppFilter.accept(org.dvb.application.AppID), Constant Field Values

DENY

public static final int DENY
When AppFilter.accept finds a matching AppPattern with this action, it returns false.

See Also:
AppFilter.accept(org.dvb.application.AppID), Constant Field Values

ASK

public static final int ASK
When AppFilter.accept finds a matching AppPattern with this action, it asks AppFilterHandler.accept for the decision.

See Also:
AppFilter.accept(org.dvb.application.AppID), AppFilterHandler.accept(org.dvb.application.AppID, org.ocap.application.AppPattern), Constant Field Values
Constructor Detail

AppPattern

public AppPattern(java.lang.String idPattern,
                  int action,
                  int priority)
Constructs a new AppPattern with no expiration.

Parameters:
idPattern - a String to specify an AppID group.
action - an action.
priority - a search order priority.
Throws:
java.lang.IllegalArgumentException - idPattern has a bad format, action or priority is out of range.

AppPattern

public AppPattern(java.lang.String idPattern,
                  int action,
                  int priority,
                  java.util.Date expirationTime,
                  java.lang.Object info)
Constructs a new AppPattern with an expiration time and MSO private information.

Parameters:
idPattern - a String to specify an AppID group.
action - an action.
priority - a search order priority.
expirationTime - time for this AppPattern to expire. null it never expires.
info - MSO specific information. Can be null.
Throws:
java.lang.IllegalArgumentException - idPattern has a bad format, action or priority is out of range.
Method Detail

getAppIDPattern

public java.lang.String getAppIDPattern()
Returns the pattern string that specifies a group of AppIDs.

Returns:
the pattern string.

getAction

public int getAction()
Returns the action associated with this AppPattern.

Returns:
the action.

getPriority

public int getPriority()
Returns the search order priority of this AppPattern.

Returns:
the search order priority.

getExpirationTime

public java.util.Date getExpirationTime()
Returns the time for this AppPattern to expire or null if it never expires.

Returns:
the expiration time or null.

getPrivateInfo

public java.lang.Object getPrivateInfo()
Returns MSO-private information of this AppPattern.

Returns:
the MSO private information.

equals

public boolean equals(java.lang.Object that)
Indicates whether some other object is "equal to" this one.

This method does not factor in expirationTime or info attributes, but does compare idPattern, action, and priority attributes.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object