2 * Copyright 2005-2011 the original author or authors.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.wamblee.xmlrouter.listener;
18 import javax.xml.transform.dom.DOMSource;
20 import org.wamblee.xml.XMLDocument;
21 import org.wamblee.xmlrouter.common.Id;
24 * Combines information about the event.
26 * @author Erik Brakkee
29 public class EventInfo {
32 private String source;
33 private Id<DOMSource> id;
35 private DOMSource event;
37 public EventInfo(long aTime, String aSource, Id<DOMSource> aId,
38 String aType, DOMSource aEvent) {
46 public long getTime() {
50 public String getSource() {
54 public Id<DOMSource> getId() {
58 public String getType() {
62 public void setType(String aType) {
66 public DOMSource getEvent() {
71 public String toString() {
72 StringBuffer buf = new StringBuffer();
74 buf.append("time " + time);
75 buf.append(", source " + source);
76 buf.append(", id " + id);
77 buf.append(", type " + type);
78 buf.append(", event " + new XMLDocument(event).print(true));
80 return buf.toString();