public abstract class AbstractFilter extends Object implements GCDisposable, IServantLifecyle, FilterOperations, JMXManageable, AbstractFilterMBean
JMXManageable.JMXCallback| Modifier and Type | Field and Description |
|---|---|
protected Map |
constraints_
contains the associated constraints.
|
static int |
CONSTRAINTS_EMPTY |
protected ReadWriteLock |
constraintsLock_ |
protected MessageFactory |
messageFactory_ |
static int |
NO_CONSTRAINTS_MATCH |
protected WildcardMap |
wildcardMap_ |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFilter(Configuration config,
EvaluationContextFactory evaluationContextFactory,
MessageFactory messageFactory,
POA poa) |
| Modifier and Type | Method and Description |
|---|---|
Object |
activate() |
ConstraintInfo[] |
add_constraints(ConstraintExp[] constraintExp)
The
add_constraints operation is invoked by a client in order to associate one
or more new constraints with the target filter object. |
int |
attach_callback(NotifySubscribe notifySubscribe) |
void |
attemptDispose() |
void |
deactivate() |
void |
destroy() |
void |
detach_callback(int id) |
void |
dispose() |
ConstraintInfo[] |
get_all_constraints() |
int[] |
get_callbacks() |
ConstraintInfo[] |
get_constraints(int[] ids) |
Date |
getCreationDate() |
Iterator |
getIterator(Object key) |
String[] |
getJMXNotificationTypes() |
String |
getJMXObjectName() |
Date |
getLastUsage() |
long |
getMatchCount() |
long |
getMatchStructuredCount() |
long |
getMatchTypedCount() |
POA |
getPOA() |
String |
listContraints() |
protected int |
match_internal(Any anyEvent)
match Any to associated constraints.
|
protected int |
match_structured_internal(StructuredEvent structuredEvent)
match the StructuredEvent to the associated constraints.
|
boolean |
match_structured(StructuredEvent structuredevent) |
protected int |
match_typed_internal(Property[] typedEvent)
match the TypedEvent to the associated constraints.
|
boolean |
match_typed(Property[] properties) |
boolean |
match(Any anyEvent) |
void |
modify_constraints(int[] deleteIds,
ConstraintInfo[] constraintInfo) |
protected int |
newConstraintId() |
protected abstract FilterConstraint |
newFilterConstraint(ConstraintExp constraintExp)
create a new FilterConstraint based on the provided ConstraintExp
|
Servant |
newServant() |
void |
registerDisposable(Disposable disposeHook)
the hooks registered by this method will be run when dispose is called.
|
void |
remove_all_constraints() |
void |
setJMXCallback(JMXManageable.JMXCallback callback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconstraint_grammarpublic static final int NO_CONSTRAINTS_MATCH
public static final int CONSTRAINTS_EMPTY
protected final Map constraints_
protected final WildcardMap wildcardMap_
protected final ReadWriteLock constraintsLock_
protected final MessageFactory messageFactory_
protected AbstractFilter(Configuration config, EvaluationContextFactory evaluationContextFactory, MessageFactory messageFactory, POA poa) throws ConfigurationException
ConfigurationExceptionpublic final Servant newServant()
newServant in interface IServantLifecylepublic final POA getPOA()
getPOA in interface IServantLifecylepublic final Object activate()
public final void deactivate()
protected int newConstraintId()
public ConstraintInfo[] add_constraints(ConstraintExp[] constraintExp) throws InvalidConstraint
add_constraints operation is invoked by a client in order to associate one
or more new constraints with the target filter object. The operation accepts as input a
sequence of constraint data structures, each element of which consists of a sequence of event
type structures (described in Section 3.2.1, "The Filter Interface," on page 3-14) and a
constraint expressed within the constraint grammar supported by the target object. Upon
processing each constraint, the target object associates a numeric identifier with the
constraint that is unique among all constraints it encapsulates. If any of the constraints in
the input sequence is not a valid expression within the supported constraint grammar, the
InvalidConstraint exception is raised. This exception contains as data the specific
constraint expression that was determined to be invalid. Upon successful processing of all
input constraint expressions, the add_constraints operation returns a sequence
in which each element will be a structure including one of the input constraint expressions,
along with the unique identifier assigned to it by the target filter object. add_constraints operation are such that its
sideeffects are performed atomically upon the target filter object. Once
add_constraints is invoked by a client, the target filter object is
temporarily disabled from usage by any proxy object it may be associated with. The operation
is then carried out, either successfully adding all of the input constraints to the target
object or none of them (in the case one of the input expressions was invalid). Upon
completion of the operation, the target filter object is effectively re-enabled and can once
again be used by associated filter objects in order to make event forwarding decisions.add_constraints in interface FilterOperationsInvalidConstraintprotected abstract FilterConstraint newFilterConstraint(ConstraintExp constraintExp) throws InvalidConstraint
InvalidConstraintpublic void modify_constraints(int[] deleteIds,
ConstraintInfo[] constraintInfo)
throws ConstraintNotFound,
InvalidConstraint
modify_constraints in interface FilterOperationsConstraintNotFoundInvalidConstraintpublic ConstraintInfo[] get_constraints(int[] ids) throws ConstraintNotFound
get_constraints in interface FilterOperationsConstraintNotFoundpublic ConstraintInfo[] get_all_constraints()
get_all_constraints in interface FilterOperationspublic void remove_all_constraints()
remove_all_constraints in interface FilterOperationspublic void destroy()
destroy in interface AbstractFilterMBeandestroy in interface FilterOperationspublic boolean match(Any anyEvent) throws UnsupportedFilterableData
match in interface FilterOperationsUnsupportedFilterableDataprotected int match_internal(Any anyEvent) throws UnsupportedFilterableData
UnsupportedFilterableDatapublic boolean match_structured(StructuredEvent structuredevent) throws UnsupportedFilterableData
match_structured in interface FilterOperationsUnsupportedFilterableDataprotected int match_structured_internal(StructuredEvent structuredEvent) throws UnsupportedFilterableData
UnsupportedFilterableDataprotected int match_typed_internal(Property[] typedEvent) throws UnsupportedFilterableData
UnsupportedFilterableDatapublic boolean match_typed(Property[] properties) throws UnsupportedFilterableData
match_typed in interface FilterOperationsUnsupportedFilterableDatapublic int attach_callback(NotifySubscribe notifySubscribe)
attach_callback in interface FilterOperationspublic void detach_callback(int id)
detach_callback in interface FilterOperationspublic int[] get_callbacks()
get_callbacks in interface FilterOperationspublic void dispose()
dispose in interface org.picocontainer.Disposablepublic void registerDisposable(Disposable disposeHook)
NotifyingDisposableregisterDisposable in interface NotifyingDisposablepublic Date getLastUsage()
getLastUsage in interface AbstractFilterMBeanpublic Date getCreationDate()
getCreationDate in interface AbstractFilterMBeanpublic long getMatchCount()
getMatchCount in interface AbstractFilterMBeanpublic long getMatchStructuredCount()
getMatchStructuredCount in interface AbstractFilterMBeanpublic long getMatchTypedCount()
getMatchTypedCount in interface AbstractFilterMBeanpublic String listContraints()
listContraints in interface AbstractFilterMBeanpublic final String getJMXObjectName()
getJMXObjectName in interface JMXManageablepublic String[] getJMXNotificationTypes()
getJMXNotificationTypes in interface JMXManageablepublic void setJMXCallback(JMXManageable.JMXCallback callback)
setJMXCallback in interface JMXManageablepublic void attemptDispose()
attemptDispose in interface GCDisposableCopyright © 2015 JacORB. All rights reserved.