fulmine.event.subscription
Class SubscriptionParameters

java.lang.Object
  extended by fulmine.Addressable
      extended by fulmine.event.subscription.SubscriptionParameters
All Implemented Interfaces:
ISubscriptionParameters, IAddressable, IDestroyable

public final class SubscriptionParameters
extends Addressable
implements ISubscriptionParameters

Standard implementation of the ISubscriptionParameters

This is thread safe.

Author:
Ramon Servadei

Constructor Summary
SubscriptionParameters(IAddressable id)
           
SubscriptionParameters(String identityRegularExpression, IType type, IDomain domain)
           
 
Method Summary
 void destroy()
          This is called when the object is being removed from application use.
 boolean includes(IAddressable other)
          Determine if the IAddressable attributes of this parameters instance would include those of another.
 boolean matches(IAddressable other)
           
 boolean matches(ISubscriptionParameters parameters)
           
 
Methods inherited from class fulmine.Addressable
equals, getAddress, getDomain, getIdentity, getType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity, getType
 

Constructor Detail

SubscriptionParameters

public SubscriptionParameters(IAddressable id)

SubscriptionParameters

public SubscriptionParameters(String identityRegularExpression,
                              IType type,
                              IDomain domain)
Method Detail

matches

public boolean matches(ISubscriptionParameters parameters)

includes

public boolean includes(IAddressable other)
Description copied from interface: ISubscriptionParameters
Determine if the IAddressable attributes of this parameters instance would include those of another. For this instance to include the other, each attribute of this instance must be an exact match or a more generalised match of corresponding attribute in the other.

For example, assuming the type and domain are equal, if this instance has the identity regular expression "foo.*" and the other instance has the identity "foo bar", then this instance effectively includes the other (it is more generalised). However, it would not include the other if the other instance has an identity regular expression ".*" as this is now more generalised than this instance.

Specified by:
includes in interface ISubscriptionParameters
Parameters:
other - the other IAddressable instance to compare with this
Returns:
true if the attributes of this instance include those of the other

matches

public boolean matches(IAddressable other)

destroy

public void destroy()
Description copied from interface: IDestroyable
This is called when the object is being removed from application use. This releases all system resources and performs clean up prior to the object becoming redundant. This operation is idempotent.

This method must not throw a RuntimeException.

Specified by:
destroy in interface IDestroyable


Copyright © 2007-2009. All Rights Reserved.