-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from swisspush/develop
Release 1.3.0
- Loading branch information
Showing
8 changed files
with
80 additions
and
4 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
18 changes: 18 additions & 0 deletions
18
kobuka-client/src/main/java/org/swisspush/kobuka/client/StreamsConfigBuilder.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.swisspush.kobuka.client; | ||
|
||
import org.swisspush.kobuka.client.base.BaseCommonClientConfigBuilder; | ||
import org.swisspush.kobuka.client.base.BaseStreamsConfigBuilder; | ||
|
||
public class StreamsConfigBuilder extends BaseStreamsConfigBuilder<StreamsConfigBuilder> { | ||
|
||
public StreamsConfigBuilder() { | ||
} | ||
|
||
public StreamsConfigBuilder(BaseStreamsConfigBuilder<?> parent) { | ||
copyFrom(parent); | ||
} | ||
|
||
public StreamsConfigBuilder(BaseCommonClientConfigBuilder<?> parent) { | ||
copyFrom(parent); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
kobuka-client/src/main/java/org/swisspush/kobuka/client/base/BaseStreamsConfigBuilder.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.swisspush.kobuka.client.base; | ||
|
||
import java.util.Map; | ||
import java.util.function.Function; | ||
|
||
/** | ||
* Base class for custom builders. Do not use directly. | ||
*/ | ||
public class BaseStreamsConfigBuilder<T extends BaseStreamsConfigBuilder<T> & ClientBuilderFunctions<T>> | ||
extends AbstractStreamsConfigBuilder<T> implements ClientBuilderFunctions<T> { | ||
|
||
public void copyFrom(BaseStreamsConfigBuilder<?> parent) { | ||
configs.putAll(parent.configs); | ||
} | ||
|
||
public void copyFrom(BaseCommonClientConfigBuilder<?> parent) { | ||
configs.putAll(parent.configs); | ||
} | ||
|
||
@Override | ||
public Map<String, Object> build() { | ||
return configs; | ||
} | ||
|
||
public <R> R transform(Function<BaseStreamsConfigBuilder<?>, R> fn) { | ||
return fn.apply(this); | ||
} | ||
} |
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