[prev in list] [next in list] [prev in thread] [next in thread]
List: james-dev
Subject: [james-project] 02/04: JAMES-2902 PotocolHandler can provide defaults for init and destroy
From: btellier () apache ! org
Date: 2019-09-30 5:58:04
Message-ID: 20190930055803.3FDA381E6A () gitbox ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 905d8b593f479aa90cd8218d2a33052927bd4f03
Author: Benoit Tellier <btellier@linagora.com>
AuthorDate: Thu Sep 26 10:58:03 2019 +0700
JAMES-2902 PotocolHandler can provide defaults for init and destroy
This enables:
- Writing hooks as lambda in tests
- Massive line count reduction for SMTP, POP3 & LMTP implementation
---
.../org/apache/james/protocols/api/handler/ProtocolHandler.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java \
b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java
index 29c4adf..02e85cd 100644
--- a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java
+++ b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/ProtocolHandler.java
@@ -36,11 +36,15 @@ public interface ProtocolHandler {
* @param config
* @throws ConfigurationException
*/
- void init(Configuration config) throws ConfigurationException;
+ default void init(Configuration config) throws ConfigurationException {
+
+ }
/**
* Destroy object
*/
- void destroy();
+ default void destroy() {
+
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic