Package org.openas2
Interface Component
-
- All Known Subinterfaces:
ActiveModule,AliasedCertificateFactory,CertificateFactory,Command,CommandRegistry,KeyStoreCertificateFactory,Logger,PartnershipFactory,Processor,ProcessorModule,ReceiverModule,ResenderModule,SenderModule,StorableCertificateFactory,StorageModule,TrackingModule
- All Known Implementing Classes:
AddPartnerCommand,AddPartnershipCommand,AliasedCertCommand,AliasedLoggingCommand,AliasedPartnershipsCommand,AS2DirectoryPollingModule,AS2FileReceiverModule,AS2MDNReceiverModule,AS2ReceiverModule,AS2SenderModule,BaseActiveModule,BaseCertificateFactory,BaseCommand,BaseCommandProcessor,BaseCommandRegistry,BaseComponent,BaseLogger,BaseMsgTrackingModule,BasePartnershipFactory,BaseProcessor,BaseProcessorModule,BaseReceiverModule,BaseResenderModule,BaseSenderModule,BaseStorageModule,ClearCertsCommand,ConsoleLogger,DbTrackingModule,DefaultProcessor,DeleteCertCommand,DeletePartnerCommand,DeletePartnershipCommand,DirectoryPollingModule,DirectoryResenderModule,EmailLogger,EmailSender,FileLogger,HealthCheckModule,HttpSenderModule,ImportCertCommand,ImportCertInEncodedStreamCommand,ListCertCommand,ListPartnersCommand,ListPartnershipsCommand,MDNFileModule,MDNSenderModule,MessageBuilderModule,MessageFileModule,MultiCommand,NetModule,PKCS12CertificateFactory,PollingModule,RefreshPartnershipsCommand,RestCommandProcessor,SchedulerComponent,SentryLogger,SetLogLevelCommand,SocketCommandProcessor,SocketLogger,StorePartnershipsCommand,StreamCommandProcessor,ViewCertCommand,ViewPartnerCommand,ViewPartnershipCommand,XMLCommandRegistry,XMLPartnershipFactory
public interface ComponentThe Component interface provides a standard way to dynamically create and initialize an object. Component-based objects also have access to a Session, which allow each component to access all components registered to it's Session. Parameters for a component are defined as static strings Note: Any object that implements this interface must have a constructor with no parameters, as these parameters should be passed to the init method.- Author:
- Aaron Silinskas
- See Also:
BaseComponent,Session
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Component lifecycle hook.java.lang.StringgetName()Returns a name for the component.java.util.Map<java.lang.String,java.lang.String>getParameters()Returns the parameters used to initialize this Component, and can also be used to modify parameters.SessiongetSession()Returns the Session used to initialize this Component.voidinit(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)Component lifecycle hook.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns 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.- Returns:
- name of the component
-
getParameters
java.util.Map<java.lang.String,java.lang.String> getParameters()
Returns the parameters used to initialize this Component, and can also be used to modify parameters.- Returns:
- map of parameter name to parameter value
-
getSession
Session getSession()
Returns the Session used to initialize this Component. The returned session is also used to locate other components if needed.- Returns:
- this component's session
-
init
void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Component lifecycle hook. After 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.- Parameters:
session- the component uses this object to access other componentsparameters- configuration values for the component- Throws:
OpenAS2Exception- If an error occurs while initializing the component- See Also:
Session
-
destroy
void destroy() throws java.lang.ExceptionComponent lifecycle hook. If lifecycle ofComponentrequires a destroy function this method can be used.- Throws:
java.lang.Exception- Something went wrong- See Also:
init(Session, Map),Session
-
-