org.apache.sling.adapter.internal
Class AdapterManagerImpl
java.lang.Object
org.apache.sling.adapter.internal.AdapterManagerImpl
- All Implemented Interfaces:
- org.apache.sling.api.adapter.AdapterManager
@Service
@Properties(value={@Property(name="service.description",value="Sling Adapter Manager"),@Property(name="service.vendor",value="The Apache Software Foundation")})
@Reference(name="AdapterFactory",
referenceInterface=org.apache.sling.api.adapter.AdapterFactory.class,
cardinality=OPTIONAL_MULTIPLE,
policy=DYNAMIC)
public class AdapterManagerImpl
- extends java.lang.Object
- implements org.apache.sling.api.adapter.AdapterManager
The AdapterManagerImpl
class implements the
AdapterManager
interface and is registered as a service for that
interface to be used by any clients.
Method Summary |
protected void |
activate(org.osgi.service.component.ComponentContext context)
|
protected void |
bindAdapterFactory(org.osgi.framework.ServiceReference reference)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
|
<AdapterType>
AdapterType |
|
getAdapter(java.lang.Object adaptable,
java.lang.Class<AdapterType> type)
Returns the adapted adaptable or null if
the object cannot be adapted. |
protected void |
unbindAdapterFactory(org.osgi.framework.ServiceReference reference)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdapterManagerImpl
public AdapterManagerImpl()
getAdapter
public <AdapterType> AdapterType getAdapter(java.lang.Object adaptable,
java.lang.Class<AdapterType> type)
- Returns the adapted
adaptable
or null
if
the object cannot be adapted.
- Specified by:
getAdapter
in interface org.apache.sling.api.adapter.AdapterManager
activate
protected void activate(org.osgi.service.component.ComponentContext context)
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext context)
- Parameters:
context
- Not used
bindAdapterFactory
protected void bindAdapterFactory(org.osgi.framework.ServiceReference reference)
unbindAdapterFactory
protected void unbindAdapterFactory(org.osgi.framework.ServiceReference reference)
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.