Rio Project 4.2 API Documentation



org.rioproject.opstring
Class OpStringFilter

java.lang.Object
  extended by org.rioproject.opstring.OpStringFilter
All Implemented Interfaces:
ServiceItemFilter

public class OpStringFilter
extends Object
implements ServiceItemFilter

Filter for matching opstring names

Author:
Dennis Reedy

Constructor Summary
OpStringFilter(String opStringName)
          Create an OpStringFilter
 
Method Summary
 boolean check(ServiceItem item)
          If the input ServiceItem has an OperationalStringEntry and the name matches the opStringName property of this class, then return true Additionally, if the input ServiceItem does not have the OperationalStringEntry in it's attribute set, return true.
static OperationalStringEntry getOperationalStringEntry(Entry[] attrs)
          Gets first OperationalStringEntry from attribute array
static boolean matches(Entry[] attrs, String opStringName)
          Determine if the attribute collecton contains an OperatonalStringEntry which matches the opStrngName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpStringFilter

public OpStringFilter(String opStringName)
Create an OpStringFilter

Parameters:
opStringName - The name of the OperationalString to filter
Method Detail

check

public boolean check(ServiceItem item)
If the input ServiceItem has an OperationalStringEntry and the name matches the opStringName property of this class, then return true Additionally, if the input ServiceItem does not have the OperationalStringEntry in it's attribute set, return true. This supports intended semantics to discover external services which may match the ServiceTemplate

Specified by:
check in interface ServiceItemFilter
See Also:
ServiceItemFilter.check(net.jini.core.lookup.ServiceItem)

matches

public static boolean matches(Entry[] attrs,
                              String opStringName)
Determine if the attribute collecton contains an OperatonalStringEntry which matches the opStrngName

Parameters:
attrs - Array of Entry objects
opStringName - The name to match
Returns:
If an OperationalStringEntry is found in the collection and it's name matches theopStringName parameter, return true, otherwise, return false

getOperationalStringEntry

public static OperationalStringEntry getOperationalStringEntry(Entry[] attrs)
Gets first OperationalStringEntry from attribute array

Parameters:
attrs - Array of Entry objects
Returns:
OperationalStringEntry

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.