Class AbstractInfo<T>
- java.lang.Object
-
- org.apache.felix.http.base.internal.runtime.AbstractInfo<T>
-
- All Implemented Interfaces:
Comparable<AbstractInfo<T>>
- Direct Known Subclasses:
ServletContextHelperInfo,WhiteboardServiceInfo
public abstract class AbstractInfo<T> extends Object implements Comparable<AbstractInfo<T>>
Base class for all info objects. Provides support for ranking and ordering of services.
-
-
Constructor Summary
Constructors Constructor Description AbstractInfo(int ranking, long serviceId)AbstractInfo(org.osgi.framework.ServiceReference<T> ref)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(AbstractInfo<T> other)Compare two info objects based on their ranking (aka reverse ServiceReference ordering)booleanequals(Object obj)protected booleangetBooleanProperty(org.osgi.framework.ServiceReference<T> ref, String key)protected Map<String,String>getInitParams(org.osgi.framework.ServiceReference<T> ref, String prefix)Get the init parameters.intgetRanking()longgetServiceId()org.osgi.framework.ServiceReference<T>getServiceReference()protected String[]getStringArrayProperty(org.osgi.framework.ServiceReference<T> ref, String key)protected StringgetStringProperty(org.osgi.framework.ServiceReference<T> ref, String key)StringgetTarget()inthashCode()protected booleanisEmpty(String value)protected booleanisEmpty(String[] value)booleanisSame(AbstractInfo<T> other)Compare two info objectsbooleanisValid()
-
-
-
Constructor Detail
-
AbstractInfo
public AbstractInfo(org.osgi.framework.ServiceReference<T> ref)
-
AbstractInfo
public AbstractInfo(int ranking, long serviceId)
-
-
Method Detail
-
isValid
public boolean isValid()
-
compareTo
public int compareTo(AbstractInfo<T> other)
Compare two info objects based on their ranking (aka reverse ServiceReference ordering)- Specified by:
compareToin interfaceComparable<T>
-
isSame
public boolean isSame(AbstractInfo<T> other)
Compare two info objects
-
isEmpty
protected boolean isEmpty(String value)
-
isEmpty
protected boolean isEmpty(String[] value)
-
getStringProperty
protected String getStringProperty(org.osgi.framework.ServiceReference<T> ref, String key)
-
getStringArrayProperty
protected String[] getStringArrayProperty(org.osgi.framework.ServiceReference<T> ref, String key)
-
getBooleanProperty
protected boolean getBooleanProperty(org.osgi.framework.ServiceReference<T> ref, String key)
-
getInitParams
protected Map<String,String> getInitParams(org.osgi.framework.ServiceReference<T> ref, String prefix)
Get the init parameters.
-
getRanking
public int getRanking()
-
getServiceId
public long getServiceId()
-
getTarget
public String getTarget()
-
getServiceReference
public org.osgi.framework.ServiceReference<T> getServiceReference()
-
-