use of org.omg.CosNotifyFilter.FilterNotFound 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;
}
use of org.omg.CosNotifyFilter.FilterNotFound in project ACS by ACS-Community.
the class NCSubscriber method notifySubscriptionRemoved.
@Override
protected void notifySubscriptionRemoved(Class<?> structClass) throws AcsJEventSubscriptionEx {
String eventTypeNameShort = (structClass == null ? "*" : structClass.getSimpleName());
try {
proxySupplier.remove_filter(subscriptionsFilters.get(eventTypeNameShort));
subscriptionsFilters.remove(eventTypeNameShort);
if (logger.isLoggable(AcsLogLevel.DELOUSE)) {
NcFilterInspector insp = new NcFilterInspector(proxySupplier, channelName + "::" + clientName + "::ProxySupplier", logger);
logger.log(AcsLogLevel.DELOUSE, "Removed filter for '" + eventTypeNameShort + "'. Current " + insp.getFilterInfo());
}
} catch (FilterNotFound e) {
throw new AcsJEventSubscriptionEx("Filter for '" + eventTypeNameShort + "' not found on the server side: ", e);
}
// If receivers is empty we just discard everything
if (receivers.isEmpty()) {
discardAllEvents();
}
}
Aggregations