use of org.omg.CosNotifyFilter.ConstraintInfo in project ACS by ACS-Community.
the class ACSRemoteAccess method createFilter.
/**
* This method can not be used in the current implementation of ACS logging
* But it will be useful for archiving.
*/
private void createFilter() {
// create filter
if (eventChannel == null)
return;
FilterFactory filterFactory = eventChannel.default_filter_factory();
Filter filter = null;
try {
filter = filterFactory.create_filter("EXTENDED_TCL");
} catch (InvalidGrammar e) {
System.out.println("Invalid grammar in ACSRemoteAccess::createFilter(): " + e);
}
// create constaints
try {
ConstraintInfo[] info = filter.add_constraints(createConstraints());
} catch (InvalidConstraint e) {
System.out.println("Invalid constraint in ACSRemoteAccess::createFilter(): " + e);
}
// add constraints to filter
}
use of org.omg.CosNotifyFilter.ConstraintInfo in project ACS by ACS-Community.
the class NcFilterInspector method getFilterInfo.
public String getFilterInfo() {
String ret = "NC filter info for '" + serverObjectName + "' ";
int[] filterIds = serverObject.get_all_filters();
ret += "(" + filterIds.length + " filters total): ";
for (int filterId : filterIds) {
ret += "{ filterId=" + filterId + "; ";
try {
Filter f = serverObject.get_filter(filterId);
String grammarName = f.constraint_grammar();
ret += "grammar=" + grammarName + "; ";
ret += "constraints: { ";
for (ConstraintInfo ci : f.get_all_constraints()) {
String cExp = ci.constraint_expression.constraint_expr;
ret += "expr=" + cExp + "; ";
for (EventType eT : ci.constraint_expression.event_types) {
String typeName = eT.type_name;
ret += "type=" + typeName + "; ";
String domainName = eT.domain_name;
ret += "domain=" + domainName + "; ";
}
}
ret += "}; ";
} catch (FilterNotFound ex) {
ret += "FilterNotFound!";
}
ret += "}; ";
}
return ret;
}
Aggregations