C - The type of the component implementation.public static class ComponentRevisionImpl.Builder<C> extends Object
ComponentRevision offers thread safe functionality to collect
information about the state of the component and build ComponentRevision instances.| Constructor and Description |
|---|
Builder(org.everit.osgi.ecm.component.resource.ComponentContainer<C> container,
Map<String,Object> properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
active()
Called when the component instance becomes active.
|
void |
addServiceRegistration(org.osgi.framework.ServiceRegistration<?> serviceRegistration)
Called when the component registers a new OSGi service that is shown as the capability of the
component.
|
ComponentRevisionImpl<C> |
build()
Builds a new
ComponentRevision based on the snapshot of the component state. |
void |
fail(Throwable cause,
boolean permanent)
Called when the component fails.
|
Set<org.osgi.framework.ServiceRegistration<?>> |
getCloneOfServiceRegistrations()
Returns a clone of the held service registrations.
|
Map<String,Object> |
getProperties() |
org.everit.osgi.ecm.component.resource.ComponentState |
getState() |
void |
inactive()
Called when the component is stopped due to some reason (it is stopped completely or the
component has to be restarted due to updating non-dynamic attributes).
|
void |
removeServiceRegistration(org.osgi.framework.ServiceRegistration<?> serviceRegistration) |
void |
setOrAddSuppressedCause(Throwable cause)
In case there is no cause, this will be the new one, otherwise the passed cause parameter
will be add as a suppressed cause of the original.
|
void |
starting()
Called when the component is starting (activate method is called but it has not finished
yet).
|
void |
stopping()
Called when the component is stopping (The deactivate method runs).
|
void |
unsatisfied()
Called when the component becomes unsatisfied.
|
void |
updateProperties(Map<String,Object> properties)
Called when the component properties are updated.
|
void |
updateSuitingsForAttribute(org.everit.osgi.ecm.metadata.ReferenceMetadata referenceMetadata,
org.everit.osgi.capabilitycollector.Suiting<?>[] suitings) |
void |
updatingConfiguration()
Called when the state is changed to
ComponentState.UPDATING_CONFIGURATION. |
public void active()
public void addServiceRegistration(org.osgi.framework.ServiceRegistration<?> serviceRegistration)
serviceRegistration - The service that was registered.public ComponentRevisionImpl<C> build()
ComponentRevision based on the snapshot of the component state.ComponentRevision.public void fail(Throwable cause, boolean permanent)
cause - The cause of the failure.permanent - Whether the failure is permanent or temporary.public Set<org.osgi.framework.ServiceRegistration<?>> getCloneOfServiceRegistrations()
public org.everit.osgi.ecm.component.resource.ComponentState getState()
public void inactive()
public void removeServiceRegistration(org.osgi.framework.ServiceRegistration<?> serviceRegistration)
public void setOrAddSuppressedCause(Throwable cause)
public void starting()
public void stopping()
public void unsatisfied()
public void updateProperties(Map<String,Object> properties)
properties - The new properties of the component.spublic void updateSuitingsForAttribute(org.everit.osgi.ecm.metadata.ReferenceMetadata referenceMetadata,
org.everit.osgi.capabilitycollector.Suiting<?>[] suitings)
public void updatingConfiguration()
ComponentState.UPDATING_CONFIGURATION.Copyright © 2011–2015 Everit Kft.. All rights reserved.