org.springframework.osgi.service.importer.event
Class OsgiServiceDependencyWaitStartingEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by org.springframework.osgi.service.importer.event.OsgiServiceDependencyEvent
              extended by org.springframework.osgi.service.importer.event.OsgiServiceDependencyWaitStartingEvent
All Implemented Interfaces:
Serializable

public class OsgiServiceDependencyWaitStartingEvent
extends OsgiServiceDependencyEvent

Dedicated event for OSGi dependencies that are imported in a timed manner. The event indicates that a dependency is missing and a bean inside the application context will start waiting for it, for a specified amount of time (given as a maximum).

Note that the actual waiting starts shortly after the event is dispatched however, there are no guarantees on when this will happen as it depends on the number of listeners interested in this event (and the amount of work done once the event is received).

Author:
Costin Leau
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
OsgiServiceDependencyWaitStartingEvent(Object source, OsgiServiceDependency dependency, long timeToWait)
          Constructs a new OsgiServiceDependencyWaitStartingEvent instance.
 
Method Summary
 long getTimeToWait()
          Returns the time (in milliseconds) the source will wait for the OSGi service to appear.
 
Methods inherited from class org.springframework.osgi.service.importer.event.OsgiServiceDependencyEvent
getServiceDependency
 
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OsgiServiceDependencyWaitStartingEvent

public OsgiServiceDependencyWaitStartingEvent(Object source,
                                              OsgiServiceDependency dependency,
                                              long timeToWait)
Constructs a new OsgiServiceDependencyWaitStartingEvent instance.

Parameters:
source - event source (usually the service importer)
dependency - dependency description
timeToWait - wait duration
Method Detail

getTimeToWait

public long getTimeToWait()
Returns the time (in milliseconds) the source will wait for the OSGi service to appear.

Returns:
Returns the timeToWait


Copyright © 2006-2009 Spring Framework. All Rights Reserved.