Search in sources :

Example 1 with IAS2Session

use of com.helger.as2lib.session.IAS2Session in project as2-server by phax.

the class XMLCommandRegistry method loadCommand.

protected void loadCommand(final IMicroElement eCommand, @Nullable final MultiCommand aParent) throws OpenAS2Exception {
    final IAS2Session aSession = getSession();
    final String sBaseDirectory = aSession instanceof AS2ServerXMLSession ? ((AS2ServerXMLSession) aSession).getBaseDirectory() : null;
    final ICommand aCommand = AS2XMLHelper.createComponent(eCommand, ICommand.class, aSession, sBaseDirectory);
    if (aParent != null)
        aParent.getCommands().add(aCommand);
    else
        addCommand(aCommand);
}
Also used : AS2ServerXMLSession(com.helger.as2.app.session.AS2ServerXMLSession) IAS2Session(com.helger.as2lib.session.IAS2Session)

Aggregations

AS2ServerXMLSession (com.helger.as2.app.session.AS2ServerXMLSession)1 IAS2Session (com.helger.as2lib.session.IAS2Session)1