org.apache.felix.ipojo.handlers.providedservice

## Class CreationStrategy

- java.lang.Object
- - org.apache.felix.ipojo.handlers.providedservice.CreationStrategy

All Implemented Interfaces:
  org.osgi.framework.ServiceFactory

Direct Known Subclasses:
  ConfigurableCreationStrategy

    public abstract class CreationStrategy
    extends java.lang.Object
    implements org.osgi.framework.ServiceFactory

Creation strategy to creation service object. This class is extended by all service object creation policy.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`CreationStrategy()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`static boolean` `isGetServiceMethod(java.lang.reflect.Method method)` Checks if the given method object is the `IPOJOServiceFactory.getService(org.apache.felix.ipojo.ComponentInstance)` method.
`static boolean` `isUngetServiceMethod(java.lang.reflect.Method method)` Checks if the given method object is the `IPOJOServiceFactory.ungetService(org.apache.felix.ipojo.ComponentInstance, Object)` method.
`abstract void` `onPublication(InstanceManager instance, java.lang.String[] interfaces, java.util.Properties props)` Method called when the service is registered.
`abstract void` `onUnpublication()` Method called when the service in unregistered.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.osgi.framework.ServiceFactory

`getService, ungetService`

### Constructor Detail

#### CreationStrategy

    public CreationStrategy()

### Method Detail

#### onPublication

    public abstract void onPublication(InstanceManager instance,
                                       java.lang.String[] interfaces,
                                       java.util.Properties props)

Method called when the service is registered.

Parameters:
  `instance` - the instance registering the service.
  `interfaces` - the exposed service specification interfaces
  `props` - the published properties.

#### onUnpublication

    public abstract void onUnpublication()

Method called when the service in unregistered.

#### isGetServiceMethod

    public static boolean isGetServiceMethod(java.lang.reflect.Method method)

Checks if the given method object is the `IPOJOServiceFactory.getService(org.apache.felix.ipojo.ComponentInstance)` method.

Parameters:
  `method` - the method to check
Returns:
  `true` if the method is the getService method `false` otherwise.

#### isUngetServiceMethod

    public static boolean isUngetServiceMethod(java.lang.reflect.Method method)

Checks if the given method object is the `IPOJOServiceFactory.ungetService(org.apache.felix.ipojo.ComponentInstance, Object)` method.

Parameters:
  `method` - the method to check
Returns:
  `true` if the method is the ungetService method `false` otherwise.