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

java.lang.Object
  extended by org.apache.felix.ipojo.handlers.event.publisher.PublisherImpl
All Implemented Interfaces:
Publisher

public class PublisherImpl
extends Object
implements Publisher

The PublisherImpl class is the implementation of the Publisher object used by components to send events.

Author:
Felix Project Team

Field Summary
static String INSTANCE_NAME_PROPERTY
          The key where the component instance name is stored.
 
Constructor Summary
PublisherImpl(EventAdminPublisherHandler handler, String[] topics, boolean synchronous, String dataKey, String instanceName)
          Constructs an Publisher with given parameters.
 
Method Summary
 void send(Dictionary content)
          Sends an event with the specified content.
 void sendData(Object object)
          Sends a data event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE_NAME_PROPERTY

public static final String INSTANCE_NAME_PROPERTY
The key where the component instance name is stored.

See Also:
Constant Field Values
Constructor Detail

PublisherImpl

public PublisherImpl(EventAdminPublisherHandler handler,
                     String[] topics,
                     boolean synchronous,
                     String dataKey,
                     String instanceName)
Constructs an Publisher with given parameters.

Parameters:
handler - the handler that will manage this publisher
topics - the topics on which events are sent
synchronous - the sending mode of events
dataKey - The key, in the content of the event, where user data are stored (may be null)
instanceName - the name of the instance creating this publisher.
Method Detail

send

public void send(Dictionary content)
Sends an event with the specified content.

Specified by:
send in interface Publisher
Parameters:
content - the content of the event

sendData

public void sendData(Object object)
Sends a data event.

Specified by:
sendData in interface Publisher
Parameters:
object - the data to send


Copyright © 2011 Apache Software Foundation. All Rights Reserved.