public abstract class AbstractComponent extends Object implements ComponentInfo
| Modifier and Type | Field and Description |
|---|---|
protected ComponentName |
componentName |
protected ComponentStatus |
componentStatus
component status
|
protected Exception |
e |
protected Implementation |
implementation |
protected SofaRuntimeContext |
sofaRuntimeContext |
| Constructor and Description |
|---|
AbstractComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
activate component
|
protected String |
aggregateBindingHealth(Collection<Binding> bindings) |
boolean |
canBeDuplicate()
whether component can be duplicated defined, default is true
|
void |
deactivate()
deactivate component
|
String |
dump()
get component information
|
void |
exception(Exception e)
create an exception to describe error
|
SofaRuntimeContext |
getContext()
get sofa runtime context
|
Implementation |
getImplementation()
get component implementation
|
ComponentName |
getName()
get component name
|
ComponentStatus |
getState()
get component status
|
boolean |
isActivated()
check component is activated or not
|
HealthResult |
isHealthy()
check component is health or not
|
boolean |
isResolved()
check component is resolved or not
|
void |
register()
register component
|
boolean |
resolve()
resolve component
|
void |
unregister()
unregister component
|
void |
unresolve()
unresolve component
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProperties, getTypeprotected ComponentStatus componentStatus
protected Implementation implementation
protected ComponentName componentName
protected SofaRuntimeContext sofaRuntimeContext
protected Exception e
public SofaRuntimeContext getContext()
ComponentInfogetContext in interface ComponentInfoSofaRuntimeContextpublic ComponentStatus getState()
ComponentInfogetState in interface ComponentInfopublic ComponentName getName()
ComponentInfogetName in interface ComponentInfopublic Implementation getImplementation()
ComponentInfogetImplementation in interface ComponentInfopublic boolean isActivated()
ComponentInfoisActivated in interface ComponentInfopublic boolean isResolved()
ComponentInfoisResolved in interface ComponentInfopublic void register()
Componentpublic void unregister()
throws ServiceRuntimeException
Componentunregister in interface ComponentServiceRuntimeExceptionpublic void unresolve()
throws ServiceRuntimeException
Componentunresolve in interface ComponentServiceRuntimeExceptionpublic boolean resolve()
Componentpublic void activate()
throws ServiceRuntimeException
Componentactivate in interface ComponentServiceRuntimeExceptionpublic void exception(Exception e) throws ServiceRuntimeException
Componentexception in interface ComponentServiceRuntimeExceptionpublic void deactivate()
throws ServiceRuntimeException
Componentdeactivate in interface ComponentServiceRuntimeExceptionpublic String dump()
ComponentInfodump in interface ComponentInfopublic HealthResult isHealthy()
ComponentInfoisHealthy in interface ComponentInfoprotected String aggregateBindingHealth(Collection<Binding> bindings)
public boolean canBeDuplicate()
ComponentInfocanBeDuplicate in interface ComponentInfoCopyright © 2021. All rights reserved.