org.apache.felix.ipojo.handlers.event.publisher
Class EventAdminPublisherMetadata

java.lang.Object
  extended by org.apache.felix.ipojo.handlers.event.publisher.EventAdminPublisherMetadata

 class EventAdminPublisherMetadata
extends java.lang.Object

Represent a publisher.

Author:
Felix Project Team

Field Summary
static java.lang.String DATA_KEY_ATTRIBUTE
          The data key attribute in the component metadata.
static java.lang.String DEFAULT_DATA_KEY_VALUE
          The data key attribute's default value.
static boolean DEFAULT_SYNCHRONOUS_VALUE
          The synchronous attribute's default value.
static java.lang.String FIELD_ATTRIBUTE
          The field attribute in the component metadata.
private  java.lang.String m_dataKey
          The key where user data are stored in the event dictionary.
private  java.lang.String m_field
          The name of the field representing the publisher in the component.
private  java.lang.String m_name
          The name which acts as an identifier.
private  boolean m_synchronous
          Events sending mode.
private  java.lang.String[] m_topics
          Topics to which events are sent.
static java.lang.String NAME_ATTRIBUTE
          The name attribute in the component metadata.
static java.lang.String SYNCHRONOUS_ATTRIBUTE
          The synchronous attribute in the component metadata.
static java.lang.String TOPICS_ATTRIBUTE
          The topics attribute in the component metadata.
 
Constructor Summary
EventAdminPublisherMetadata(Element publisher)
          Constructs a publisher from its metadata description.
 
Method Summary
 void check()
          Checks that the required instance configurable attributes are all set.
 java.lang.String getDataKey()
          Gets the dataKey attribute of the publisher.
 java.lang.String getField()
          Gets the field attribute of the publisher.
 java.lang.String getName()
          Gets the name attribute of the publisher.
 java.lang.String[] getTopics()
          Gets the topics attribute of the publisher.
 boolean isSynchronous()
          Gets the synchronous attribute of the publisher.
 void setTopics(java.lang.String topicsString)
          Sets the topics attribute of the publisher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
The name attribute in the component metadata.

See Also:
Constant Field Values

FIELD_ATTRIBUTE

public static final java.lang.String FIELD_ATTRIBUTE
The field attribute in the component metadata.

See Also:
Constant Field Values

TOPICS_ATTRIBUTE

public static final java.lang.String TOPICS_ATTRIBUTE
The topics attribute in the component metadata.

See Also:
Constant Field Values

SYNCHRONOUS_ATTRIBUTE

public static final java.lang.String SYNCHRONOUS_ATTRIBUTE
The synchronous attribute in the component metadata.

See Also:
Constant Field Values

DATA_KEY_ATTRIBUTE

public static final java.lang.String DATA_KEY_ATTRIBUTE
The data key attribute in the component metadata.

See Also:
Constant Field Values

DEFAULT_DATA_KEY_VALUE

public static final java.lang.String DEFAULT_DATA_KEY_VALUE
The data key attribute's default value.

See Also:
Constant Field Values

DEFAULT_SYNCHRONOUS_VALUE

public static final boolean DEFAULT_SYNCHRONOUS_VALUE
The synchronous attribute's default value.

See Also:
Constant Field Values

m_name

private final java.lang.String m_name
The name which acts as an identifier.


m_field

private final java.lang.String m_field
The name of the field representing the publisher in the component.


m_topics

private java.lang.String[] m_topics
Topics to which events are sent.


m_synchronous

private final boolean m_synchronous
Events sending mode.


m_dataKey

private final java.lang.String m_dataKey
The key where user data are stored in the event dictionary.

Constructor Detail

EventAdminPublisherMetadata

public EventAdminPublisherMetadata(Element publisher)
                            throws ConfigurationException
Constructs a publisher from its metadata description.

Parameters:
publisher - the publisher metadata description.
Throws:
ConfigurationException - if the configuration of the component or the instance is invalid.
Method Detail

setTopics

public void setTopics(java.lang.String topicsString)
               throws ConfigurationException
Sets the topics attribute of the publisher.

Parameters:
topicsString - the comma separated list of the topics on which events are sent
Throws:
ConfigurationException - the specified topic string is malformed

check

public void check()
           throws ConfigurationException
Checks that the required instance configurable attributes are all set.

Throws:
ConfigurationException - if a required attribute is missing

getName

public java.lang.String getName()
Gets the name attribute of the publisher.

Returns:
the name

getField

public java.lang.String getField()
Gets the field attribute of the publisher.

Returns:
the field

getTopics

public java.lang.String[] getTopics()
Gets the topics attribute of the publisher.

Returns:
the topics

isSynchronous

public boolean isSynchronous()
Gets the synchronous attribute of the publisher.

Returns:
the synchronous mode

getDataKey

public java.lang.String getDataKey()
Gets the dataKey attribute of the publisher.

Returns:
the data key


Copyright © 2006-2010 The Apache Software Foundation. All Rights Reserved.