本文整理汇总了Java中tigase.criteria.Criteria类的典型用法代码示例。如果您正苦于以下问题:Java Criteria类的具体用法?Java Criteria怎么用?Java Criteria使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Criteria类属于tigase.criteria包,在下文中一共展示了Criteria类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import tigase.criteria.Criteria; //导入依赖的package包/类
public boolean process(final Packet packet) throws ComponentException, TigaseStringprepException {
if (dirty)
initIfRequired();
boolean handled = false;
if (log.isLoggable(Level.FINER)) {
log.finest("Processing packet: " + packet.toString());
}
for (Module module : this.modules) {
Criteria criteria = module.getModuleCriteria();
if (criteria != null && criteria.match(packet.getElement())) {
handled = true;
if (log.isLoggable(Level.FINER)) {
log.finer("Handled by module " + module.getClass());
}
module.process(packet);
if (log.isLoggable(Level.FINEST)) {
log.finest("Finished " + module.getClass());
}
break;
}
}
return handled;
}
示例2: process
import tigase.criteria.Criteria; //导入依赖的package包/类
public boolean process(final Packet packet, final ElementWriter writer) throws ComponentException,
TigaseStringprepException {
if (writer == null)
throw new Error("ElementWriter is null");
boolean handled = false;
if (log.isLoggable(Level.FINER)) {
log.finest("Processing packet: " + packet.toString());
}
for (Module module : this.modules) {
Criteria criteria = module.getModuleCriteria();
if (criteria != null && criteria.match(packet.getElement())) {
handled = true;
if (log.isLoggable(Level.FINER)) {
log.finer("Handled by module " + module.getClass());
}
module.process(packet);
if (log.isLoggable(Level.FINEST)) {
log.finest("Finished " + module.getClass());
}
break;
}
}
return handled;
}
示例3: clonePresence
import tigase.criteria.Criteria; //导入依赖的package包/类
protected Element clonePresence(Element element) {
Element presence = new Element(element);
if (filterEnabled) {
List<Element> cc = element.getChildren();
if (cc != null) {
@SuppressWarnings("rawtypes")
List<XMLNodeIfc> children = new ArrayList<XMLNodeIfc>();
for (Element c : cc) {
for (Criteria crit : allowedElements) {
if (crit.match(c)) {
children.add(c);
break;
}
}
}
presence.setChildren(children);
}
}
Element toRemove = presence.getChild("x", "http://jabber.org/protocol/muc");
if (toRemove != null)
presence.removeChild(toRemove);
return presence;
}
示例4: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
@Override
public Criteria getModuleCriteria() {
return CRIT;
}
示例5: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
@Override
public Criteria getModuleCriteria() {
return criteria;
}
示例6: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
@Override
public Criteria getModuleCriteria() {
return null;
}
示例7: add
import tigase.criteria.Criteria; //导入依赖的package包/类
@Override
public Criteria add(Criteria criteria) {
throw new RuntimeException("UNSUPPORTED!");
}
示例8: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
/**
* Method description
*
* @return
*/
@Override
public Criteria getModuleCriteria() {
return CRIT;
}
示例9: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
/**
* Returns critera used by Component to select module to handle incoming
* stanza.
*
* @return criteria of selecting module.
*/
Criteria getModuleCriteria();
示例10: getModuleCriteria
import tigase.criteria.Criteria; //导入依赖的package包/类
Criteria getModuleCriteria();