org.apache.felix.ipojo.handler.temporal
Class TemporalHandler

java.lang.Object
  extended by org.apache.felix.ipojo.Handler
      extended by org.apache.felix.ipojo.PrimitiveHandler
          extended by org.apache.felix.ipojo.handler.temporal.TemporalHandler
All Implemented Interfaces:
ConstructorInjector, FieldInterceptor, MethodInterceptor, DependencyStateListener

public class TemporalHandler
extends PrimitiveHandler
implements DependencyStateListener

Temporal dependency handler. A temporal dependency waits (block) for the availability of the service. If no provider arrives in the specified among of time, a runtime exception is thrown.

Author:
Felix Project Team

Field Summary
static int DEFAULT_IMPLEMENTATION
          Uses a default-implementation object.
static int DEFAULT_TIMEOUT
          Default timeout if not specified.
static int EMPTY
          Uses an empty array.
static String NAMESPACE
          The handler namespace.
static int NO_POLICY
          No policy.
static int NULL
          Uses null.
static int NULLABLE
          Uses a nullable object.
 
Fields inherited from class org.apache.felix.ipojo.PrimitiveHandler
HANDLER_TYPE
 
Fields inherited from class org.apache.felix.ipojo.Handler
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
 
Constructor Summary
TemporalHandler()
           
 
Method Summary
 void configure(Element meta, Dictionary dictionary)
          Configure method.
 void invalidate(DependencyModel dependencymodel)
          Nothing to do.
 void start()
          Start method.
 void stop()
          Stop method.
 void validate(DependencyModel dependencymodel)
          Nothing to do.
 
Methods inherited from class org.apache.felix.ipojo.PrimitiveHandler
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, onGet, onSet, setFactory
 
Methods inherited from class org.apache.felix.ipojo.Handler
debug, error, error, getDescription, getHandlerManager, getValidity, info, initializeComponentFactory, isValid, reconfigure, setValidity, stateChanged, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final int DEFAULT_TIMEOUT
Default timeout if not specified.

See Also:
Constant Field Values

NO_POLICY

public static final int NO_POLICY
No policy.

See Also:
Constant Field Values

NULLABLE

public static final int NULLABLE
Uses a nullable object.

See Also:
Constant Field Values

DEFAULT_IMPLEMENTATION

public static final int DEFAULT_IMPLEMENTATION
Uses a default-implementation object.

See Also:
Constant Field Values

EMPTY

public static final int EMPTY
Uses an empty array.

See Also:
Constant Field Values

NULL

public static final int NULL
Uses null.

See Also:
Constant Field Values

NAMESPACE

public static final String NAMESPACE
The handler namespace.

See Also:
Constant Field Values
Constructor Detail

TemporalHandler

public TemporalHandler()
Method Detail

start

public void start()
Start method. Starts managed dependencies.

Specified by:
start in class Handler
See Also:
Handler.start()

stop

public void stop()
Stop method. Stops managed dependencies.

Specified by:
stop in class Handler
See Also:
Handler.stop()

configure

public void configure(Element meta,
                      Dictionary dictionary)
               throws ConfigurationException
Configure method. Creates managed dependencies.

Specified by:
configure in class Handler
Parameters:
meta - the component type metadata.
dictionary - the instance configuration.
Throws:
ConfigurationException - if the dependency is not configured correctly
See Also:
Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)

invalidate

public void invalidate(DependencyModel dependencymodel)
Nothing to do. A temporal dependency is always valid.

Specified by:
invalidate in interface DependencyStateListener
Parameters:
dependencymodel - dependency.
See Also:
DependencyStateListener.invalidate(org.apache.felix.ipojo.util.DependencyModel)

validate

public void validate(DependencyModel dependencymodel)
Nothing to do. A temporal dependency is always valid.

Specified by:
validate in interface DependencyStateListener
Parameters:
dependencymodel - dependency.
See Also:
DependencyStateListener.validate(org.apache.felix.ipojo.util.DependencyModel)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.