public class BaseComponent extends Object implements Component
Constructor and Description |
---|
BaseComponent() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Component lifecycle hook.
|
String |
getName()
Returns a name for the component.
|
String |
getParameter(String key,
boolean required) |
String |
getParameter(String key,
String defaultValue) |
int |
getParameterInt(String key,
boolean required) |
Map<String,String> |
getParameters()
Returns the parameters used to initialize this Component, and can also be used
to modify parameters.
|
Session |
getSession()
Returns the Session used to initialize this Component.
|
void |
init(Session session,
Map<String,String> parameters)
Component lifecycle hook.
|
void |
setParameter(String key,
int value) |
void |
setParameter(String key,
String value) |
public String getName()
Component
public void setParameter(String key, int value)
public String getParameter(String key, boolean required) throws InvalidParameterException
InvalidParameterException
public String getParameter(String key, String defaultValue) throws InvalidParameterException
InvalidParameterException
public int getParameterInt(String key, boolean required) throws InvalidParameterException
InvalidParameterException
public Map<String,String> getParameters()
Component
getParameters
in interface Component
public Session getSession()
Component
getSession
in interface Component
public void init(Session session, Map<String,String> parameters) throws OpenAS2Exception
Component
init
in interface Component
session
- the component uses this object to access other componentsparameters
- configuration values for the componentOpenAS2Exception
- If an error occurs while initializing the componentSession
public void destroy() throws Exception
Component
Component
requires a destroy function this method can be used.destroy
in interface Component
Exception
- Something went wrongComponent.init(Session, Map)
,
Session
Copyright © 2018. All rights reserved.