本文整理了Java中org.opennms.netmgt.xml.event.Event.getParmCollection()
方法的一些代码示例,展示了Event.getParmCollection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getParmCollection()
方法的具体详情如下:
包路径:org.opennms.netmgt.xml.event.Event
类名称:Event
方法名:getParmCollection
[英]Returns the Collection of parms for this event
[中]返回此事件的PARM集合
代码示例来源:origin: OpenNMS/opennms
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return String.valueOf(event.getParmCollection().size());
}
},
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
@Override
public String getValue(String parm, String parsedParm, Event event, EventUtil eventUtil) {
return String.valueOf(event.getParmCollection().size());
}
},
代码示例来源:origin: OpenNMS/opennms
public void setEventParametersFromEvent(final Event event) {
this.m_eventParameters = EventParameterUtils.normalize(event.getParmCollection()).values().stream()
.map(p -> new OnmsEventParameter(this, p))
.collect(Collectors.toList());
}
代码示例来源:origin: OpenNMS/opennms
public InMemoryEventBean(Event event) {
this.event = Objects.requireNonNull(event);
this.severity = ModelMappers.toSeverity(OnmsSeverity.get(event.getSeverity()));
this.parameters = ImmutableList.copyOf(event.getParmCollection().stream()
.filter(Objects::nonNull) // Skip null parameters
.map(EventParameterBean::new)
.collect(Collectors.toList()));
}
代码示例来源:origin: OpenNMS/opennms
public String get(Event event) {
List<Parm> parms = event.getParmCollection();
return vbnumber > parms.size() ? null : EventConstants.getValueAsString(parms.get(vbnumber-1).getValue());
}
@Override
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Tl1d".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Tl1d was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
final List<Parm> parmCollection = event.getParmCollection();
for (final Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && DAEMON_NAME.equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: discovery was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Provisiond".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Provisiond was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Provisiond.RancidProvisioningAdapter".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Provisiond.RancidProvisioningAdapter was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Reportd".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Reportd was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: org.opennms.features/org.opennms.features.discovery
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
final List<Parm> parmCollection = event.getParmCollection();
for (final Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && DAEMON_NAME.equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: discovery was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private boolean isReloadConfigEventTarget(final Event event) {
boolean isTarget = false;
for (final Parm parm : event.getParmCollection()) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && ("Provisiond." + NAME).equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Provisiond. {} was target of reload event: {}", isTarget, NAME);
return isTarget;
}
}
代码示例来源:origin: org.opennms/opennms-map-provisioning-adapter
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Provisiond.MapProvisioningAdapter".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Provisiond.MapProvisioningAdapter was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: org.opennms/opennms-provisiond
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
List<Parm> parmCollection = event.getParmCollection();
for (Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Provisiond".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: Provisiond was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: org.opennms/org.opennms.features.discovery
private boolean isReloadConfigEventTarget(Event event) {
boolean isTarget = false;
final List<Parm> parmCollection = event.getParmCollection();
for (final Parm parm : parmCollection) {
if (EventConstants.PARM_DAEMON_NAME.equals(parm.getParmName()) && "Discovery".equalsIgnoreCase(parm.getValue().getContent())) {
isTarget = true;
break;
}
}
LOG.debug("isReloadConfigEventTarget: discovery was target of reload event: {}", isTarget);
return isTarget;
}
代码示例来源:origin: OpenNMS/opennms
private static List<String> getPrettyParms(final Event event) {
final List<String> parms = new ArrayList<>();
for (final Parm p : event.getParmCollection()) {
parms.add(p.getParmName() + "=" + p.getValue().getContent());
}
return parms;
}
代码示例来源:origin: org.opennms.features.events/org.opennms.features.events.daemon
private static List<String> getPrettyParms(final Event event) {
final List<String> parms = new ArrayList<>();
for (final Parm p : event.getParmCollection()) {
parms.add(p.getParmName() + "=" + p.getValue().getContent());
}
return parms;
}
代码示例来源:origin: OpenNMS/opennms
protected static void parmPresentAndValueNonNull(Event event, String parmName) {
boolean parmPresent = false;
for (Parm parm : event.getParmCollection()) {
if (parmName.equals(parm.getParmName())) {
assertNotNull("Value content of parm '" + parmName + "'", parm.getValue().getContent());
parmPresent = true;
}
}
assertTrue("Parm '" + parmName + "' present", parmPresent);
}
代码示例来源:origin: OpenNMS/opennms
private static void compareEvents(Event anticipated, Event received) {
assertEquals("UEIs must match", anticipated.getUei(), received.getUei());
assertEquals("NodeIDs must match", anticipated.getNodeid(), received.getNodeid());
assertEquals("interfaces must match", anticipated.getInterface(), received.getInterface());
assertEquals("services must match", anticipated.getService(), received.getService());
compareParms(anticipated.getParmCollection(), received.getParmCollection());
}
代码示例来源:origin: OpenNMS/opennms
private static void compareEvents(Event anticipated, Event received) {
assertEquals("UEIs must match", anticipated.getUei(), received.getUei());
assertEquals("NodeIDs must match", anticipated.getNodeid(), received.getNodeid());
assertEquals("interfaces must match", anticipated.getInterface(), received.getInterface());
assertEquals("services must match", anticipated.getService(), received.getService());
compareParms(anticipated.getParmCollection(), received.getParmCollection());
}
内容来源于网络,如有侵权,请联系作者删除!