org.springframework.osgi.extensions.annotation
Annotation Type ServiceReference


@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface ServiceReference

Marks a method (typically a JavaBean setter method) as requiring an OSGi service reference.

Author:
Andy Piper

Optional Element Summary
 ServiceReferenceCardinality cardinality
          The cardinality of the service reference, defaults to mandatory.
 ServiceReferenceClassLoader contextClassLoader
          The invocation context classloader setting.
 String filter
          filter used to narrow service matches, may be null
 String serviceBeanName
          The name of the bean that backs the injected service.
 Class<?>[] serviceTypes
          Interface (or class) of the service to be injected
 int timeout
          Timeout for service resolution in milliseconds.
 

serviceBeanName

public abstract String serviceBeanName
The name of the bean that backs the injected service. May be null.

Default:
""

cardinality

public abstract ServiceReferenceCardinality cardinality
The cardinality of the service reference, defaults to mandatory.

Default:
C1__1

contextClassLoader

public abstract ServiceReferenceClassLoader contextClassLoader
The invocation context classloader setting. Defalts to the classloader of the client.

Default:
CLIENT

timeout

public abstract int timeout
Timeout for service resolution in milliseconds.

Default:
300000

serviceTypes

public abstract Class<?>[] serviceTypes
Interface (or class) of the service to be injected

Default:
org.springframework.osgi.extensions.annotation.ServiceReference.class

filter

public abstract String filter
filter used to narrow service matches, may be null

Default:
""


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