Package com.helger.as2lib
Class AbstractDynamicComponent
java.lang.Object
com.helger.as2lib.AbstractDynamicComponent
- All Implemented Interfaces:
IDynamicComponent
- Direct Known Subclasses:
AbstractCertificateFactory,AbstractMessageProcessor,AbstractPartnershipFactory,AbstractProcessorModule
Abstract implementation of
IDynamicComponent.- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.helger.commons.concurrent.SimpleReadWriteLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal com.helger.commons.collection.attr.StringMapattrs()booleanfinal intfinal StringgetName()Returns a name for the component.final IAS2SessionReturns the Session used to initialize this Component.inthashCode()voidinitDynamicComponent(IAS2Session aSession, com.helger.commons.collection.attr.IStringMap aParameters) After creating a Component object, this method should be called to set any parameters used by the component.toString()
-
Field Details
-
m_aRWLock
protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock
-
-
Constructor Details
-
AbstractDynamicComponent
public AbstractDynamicComponent()
-
-
Method Details
-
attrs
- Specified by:
attrsin interfaceIDynamicComponent- Returns:
- The attributes of this component.
-
getName
Description copied from interface:IDynamicComponentReturns a name for the component. These names are not guaranteed to be unique, and are intended for display and logging. Generally this is the class name of the Component object, without package information.- Specified by:
getNamein interfaceIDynamicComponent- Returns:
- name of the component
-
getAttributeAsStringRequired
@Nonnull public final String getAttributeAsStringRequired(@Nonnull String sKey) throws AS2InvalidParameterException - Throws:
AS2InvalidParameterException
-
getAttributeAsIntRequired
public final int getAttributeAsIntRequired(@Nonnull String sKey) throws AS2InvalidParameterException - Throws:
AS2InvalidParameterException
-
getSession
Description copied from interface:IDynamicComponentReturns the Session used to initialize this Component. The returned session is also used to locate other components if needed.- Specified by:
getSessionin interfaceIDynamicComponent- Returns:
- this component's session. Never
null.
-
initDynamicComponent
@OverridingMethodsMustInvokeSuper public void initDynamicComponent(@Nonnull IAS2Session aSession, @Nullable com.helger.commons.collection.attr.IStringMap aParameters) throws AS2Exception Description copied from interface:IDynamicComponentAfter creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
initDynamicComponentin interfaceIDynamicComponent- Parameters:
aSession- the component uses this object to access other componentsaParameters- configuration values for the component. All parameters will be stored as attributes of this component. All attributes existing before this method is called will be removed!- Throws:
AS2Exception- If an error occurs while initializing the componentAS2InvalidParameterException- If a required parameter is null in the parameters Map- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-