at.ac.tuwien.infosys.sm4all.copal.api.listener.xml
Class ContextListenerMarshaller

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.listener.xml.ContextListenerMarshaller
All Implemented Interfaces:
Marshaller<ContextListener>

public class ContextListenerMarshaller
extends java.lang.Object
implements Marshaller<ContextListener>

Marshals a ContextListener into an Element.

Author:
sanjin

Nested Class Summary
static class ContextListenerMarshaller.Builder
          Builder of ContextListenerMarshaller.
 
Field Summary
static java.lang.String LISTENER_ELEMENT
          The local name of child Elements used in the ListMarshaller.Builder that is returned by the getListBuilder().
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
 
Constructor Summary
ContextListenerMarshaller(org.w3c.dom.Element element)
          Creates instance of ContextListener Marshaller which uses specified Element for marshalling.
 
Method Summary
 org.w3c.dom.Element getElement()
          Returns the Element used for marshalling.
static ListMarshaller.Builder<ContextListener> getListBuilder()
          Creates instance of ListMarshaller.Builder for ContextListeners.
 void marshal(ContextListener listener)
          Marshals specified ContextListener into the Element.
 void remove()
          Removes any marshaled ContextListener from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of ContextListener from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LISTENER_ELEMENT

public static final java.lang.String LISTENER_ELEMENT
The local name of child Elements used in the ListMarshaller.Builder that is returned by the getListBuilder().

See Also:
Constant Field Values

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
The name of attribute that holds marshaled name.

See Also:
Constant Field Values
Constructor Detail

ContextListenerMarshaller

public ContextListenerMarshaller(org.w3c.dom.Element element)
Creates instance of ContextListener Marshaller which uses specified Element for marshalling.

Parameters:
element - the Element used for marshalling.
Throws:
java.lang.NullPointerException - if specified Element is null.
Method Detail

getElement

public org.w3c.dom.Element getElement()
Returns the Element used for marshalling.

Returns:
the Element used for marshalling.

unmarshalName

public java.lang.String unmarshalName()
                               throws FailedUnmarshallingException
Unmarshals name of ContextListener from the Element.

Returns:
the name of marshaled ContextListener.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

public void marshal(ContextListener listener)
Marshals specified ContextListener into the Element.

Specified by:
marshal in interface Marshaller<ContextListener>
Parameters:
listener - the ContextListener.
Throws:
java.lang.NullPointerException - if specified ContextListener is null.

remove

public void remove()
Removes any marshaled ContextListener from the Element.

Specified by:
remove in interface Marshaller<ContextListener>

getListBuilder

public static ListMarshaller.Builder<ContextListener> getListBuilder()
Creates instance of ListMarshaller.Builder for ContextListeners. The returned ListMarshaller.Builder does not have the parent Element set and caller should set it before building the ListMarshaller for ContextListeners. The name for child Elements is set to LISTENER_ELEMENT.

Returns:
the ListMarshaller.Builder for ContextListeners.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.