-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor bufixes partner poller and proxy host (#276)
* Fix bad merge * Updated documentation for rest API * Make error message more useful * Support setting the valid days and start date as ENV vars * Fix missing closing $ in parameter string. * Merge upstream * Remove unused imports * Make all modules require supporting the getModuleAction method to facilitate testing. * Support getModuleAction method. * Fix cache not being reset when partnerships changed. * Rework the test so that it is less brittle. * Remove redundant pollerConfig attribute on partnership element. * Add helper method for finding modules. * Start the partnership pollers after a partnership file refresh. * Documentation for new release
- Loading branch information
1 parent
49aea86
commit 1116291
Showing
32 changed files
with
471 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 27 additions & 1 deletion
28
Server/src/main/java/org/openas2/processor/BaseProcessorModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
package org.openas2.processor; | ||
|
||
import java.util.Map; | ||
|
||
import org.openas2.BaseComponent; | ||
import org.openas2.OpenAS2Exception; | ||
import org.openas2.message.Message; | ||
import org.openas2.params.InvalidParameterException; | ||
|
||
|
||
public class BaseProcessorModule extends BaseComponent implements ProcessorModule { | ||
|
||
@Override | ||
public String getModuleAction() { | ||
try { | ||
return getParameter(MODULE_ACTION_ATTRIB, false); | ||
} catch (InvalidParameterException e) { | ||
// For now return null but will change so that all modules must set the parameter | ||
return null; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean canHandle(String action, Message msg, Map<String, Object> options) { | ||
return action.equalsIgnoreCase(getModuleAction()); | ||
} | ||
|
||
public abstract class BaseProcessorModule extends BaseComponent implements ProcessorModule { | ||
@Override | ||
public void handle(String action, Message msg, Map<String, Object> options) throws OpenAS2Exception { | ||
throw new OpenAS2Exception("Module must implement the handle() method: " + this.getClass().getName()); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.