at.ac.tuwien.infosys.sm4all.copal.core.internal
Class DeadLetterChannelImpl

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
      extended by at.ac.tuwien.infosys.sm4all.copal.core.internal.DeadLetterChannelImpl
All Implemented Interfaces:
ContextListener, DependencyTrackerCustomizer, DeadLetterChannel, Observable<DeadLetterChannel.Reason,ContextEvent,DeadLetterChannel.ChannelObserver>, org.osgi.framework.BundleActivator

public class DeadLetterChannelImpl
extends GenericActivator
implements DeadLetterChannel

Implementation of the DeadLetterChannel interface.

Author:
sanjin

Nested Class Summary
 
Nested classes/interfaces inherited from interface at.ac.tuwien.infosys.sm4all.copal.api.service.DeadLetterChannel
DeadLetterChannel.ChannelObserver, DeadLetterChannel.Reason
 
Constructor Summary
DeadLetterChannelImpl()
          Creates an instance of the DeadLetterChannel implementation.
 
Method Summary
 void attach(ContextListener listener)
          Attaches specified ContextListener so it will in future receive notifications on dead ContextEvents.
 void attach(DeadLetterChannel.ChannelObserver observer)
          Attaches specified Observer so it will in future receive notifications on changes.
 void detach(ContextListener listener)
          Detach specified ContextListener so it will not receive any future notifications on dead ContextEvents.
 void detach(DeadLetterChannel.ChannelObserver observer)
          Detach specified Observer so it will not receive any future notifications on changes.
 java.lang.String getName()
          Returns the globally unique name of this ContextListener.
 boolean isStarted()
          Returns if this DeadLetterChannel has been started by an OSGi framework.
 void onEvent(ContextEvent event)
          This method is called when a ContextEvent occurs for which this listener has been register to be notified.
protected  void start()
          Called when all dependencies are met.
protected  void stop()
          Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
addingService, getDependency, modifiedService, register, register, removedService, start, stop, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadLetterChannelImpl

public DeadLetterChannelImpl()
Creates an instance of the DeadLetterChannel implementation.

Method Detail

attach

public void attach(ContextListener listener)
Description copied from interface: DeadLetterChannel
Attaches specified ContextListener so it will in future receive notifications on dead ContextEvents.

Specified by:
attach in interface DeadLetterChannel
Parameters:
listener - the ContextListener.

attach

public void attach(DeadLetterChannel.ChannelObserver observer)
Description copied from interface: Observable
Attaches specified Observer so it will in future receive notifications on changes.

Specified by:
attach in interface Observable<DeadLetterChannel.Reason,ContextEvent,DeadLetterChannel.ChannelObserver>
Parameters:
observer - the Observer.

detach

public void detach(ContextListener listener)
Description copied from interface: DeadLetterChannel
Detach specified ContextListener so it will not receive any future notifications on dead ContextEvents.

Specified by:
detach in interface DeadLetterChannel
Parameters:
listener - the ContextListener.

detach

public void detach(DeadLetterChannel.ChannelObserver observer)
Description copied from interface: Observable
Detach specified Observer so it will not receive any future notifications on changes.

Specified by:
detach in interface Observable<DeadLetterChannel.Reason,ContextEvent,DeadLetterChannel.ChannelObserver>
Parameters:
observer - the Observer.

isStarted

public boolean isStarted()
Returns if this DeadLetterChannel has been started by an OSGi framework.

Returns:
if this DeadLetterChannel has been started by an OSGi framework.

start

protected void start()
Description copied from class: GenericActivator
Called when all dependencies are met.

Specified by:
start in class GenericActivator

stop

protected void stop()
Description copied from class: GenericActivator
Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.

Specified by:
stop in class GenericActivator

getName

public java.lang.String getName()
Description copied from interface: ContextListener
Returns the globally unique name of this ContextListener.

Specified by:
getName in interface ContextListener
Returns:
the globally unique name of this ContextListener.

onEvent

public void onEvent(ContextEvent event)
Description copied from interface: ContextListener
This method is called when a ContextEvent occurs for which this listener has been register to be notified.

Specified by:
onEvent in interface ContextListener
Parameters:
event - the occurred ContextEvent.


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