public abstract class AbstractDeclaration extends AbstractService implements Declaration, DeclarationHandle, Status
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DECLARATION_BOUND_MESSAGE
The message used when a declaration is bound.
|
m_bundleContext
Modifier | Constructor and Description |
---|---|
protected |
AbstractDeclaration(org.osgi.framework.BundleContext bundleContext,
java.lang.Class<?> type) |
Modifier and Type | Method and Description |
---|---|
void |
bind()
Binds the declaration.
|
java.lang.String |
getMessage()
Gets the unbound message if any.
|
Status |
getStatus()
Gets the status of the declaration.
|
java.lang.Throwable |
getThrowable()
Gets the unbound error if any.
|
boolean |
isBound()
Is the declaration fulfilled ?
|
void |
publish()
Publish the
Declaration . |
void |
retract()
Retract the
Declaration service. |
void |
unbind(java.lang.String message)
Unbinds the declaration.
|
void |
unbind(java.lang.String message,
java.lang.Throwable throwable)
Unbinds the declaration.
|
getBundleContext, getRegistration, getServiceProperties, isRegistered, registerService, start, stop
public static final java.lang.String DECLARATION_BOUND_MESSAGE
protected AbstractDeclaration(org.osgi.framework.BundleContext bundleContext, java.lang.Class<?> type)
public boolean isBound()
Status
public java.lang.String getMessage()
Status
getMessage
in interface Status
public java.lang.Throwable getThrowable()
Status
getThrowable
in interface Status
public Status getStatus()
getStatus
in interface Declaration
getStatus
in interface DeclarationHandle
public void bind()
bind
in interface Declaration
public void unbind(java.lang.String message)
unbind
in interface Declaration
message
- an explanationunbind(String, Throwable)
public void unbind(java.lang.String message, java.lang.Throwable throwable)
unbind
in interface Declaration
message
- an explanationthrowable
- an errorpublic void publish()
DeclarationHandle
Declaration
. If the declaration
is already registered, it's a no-op operation.publish
in interface DeclarationHandle
public void retract()
DeclarationHandle
Declaration
service. If the
declaration is not registered, it's a no-op operation.retract
in interface DeclarationHandle
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.