public class DefaultEventType extends Object implements EventType
DefaultEventType
defines a simple EventType implementation that
only consists of a qualified event name consisting of namespace plus local
name.Modifier and Type | Method and Description |
---|---|
static EventType[] |
create(String[] localNames,
Namespace namespace)
Factory method to create an array of new
EventType for the
specified localNames and the specified namespace. |
static EventType |
create(String localName,
Namespace namespace)
Factory method to create a new
EventType . |
static EventType[] |
createFromXml(Element eventType)
Retrieves one or multiple
EventType s from the 'eventtype'
Xml element. |
String |
getName() |
Namespace |
getNamespace() |
Element |
toXml(Document document)
Returns a single empty Xml element where namespace and local name of this
event type define the elements name.
|
public static EventType create(String localName, Namespace namespace)
EventType
.localName
- namespace
- public static EventType[] create(String[] localNames, Namespace namespace)
EventType
for the
specified localNames and the specified namespace.localNames
- namespace
- public static EventType[] createFromXml(Element eventType)
EventType
s from the 'eventtype'
Xml element. While a subscription may register multiple types (thus
the 'eventtype' contains multiple child elements), a single event may only
refer to one single type.eventType
- public String getName()
getName
in interface EventType
EventType.getName()
public Namespace getNamespace()
getNamespace
in interface EventType
EventType.getNamespace()
public Element toXml(Document document)
EventType.create("someevent", Namespace.getNamespace("F", "http://www.foo.bar/eventtypes")); returns the following element upon call of toXml: <F:someevent xmlns:F="http://www.foo.bar/eventtypes" />
toXml
in interface XmlSerializable
document
- to be used as factory.XmlSerializable.toXml(Document)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.