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
 boolean greedyProxying
          Whether or not to proxy greedily in collection references.
 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:
org.springframework.osgi.extensions.annotation.ServiceReferenceCardinality.C1__1

contextClassLoader

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

Default:
org.springframework.osgi.extensions.annotation.ServiceReferenceClassLoader.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

greedyProxying

public abstract boolean greedyProxying
Whether or not to proxy greedily in collection references.

Default:
false

filter

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

Default:
""


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