-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Component classes for spring cloud stream plugin (#684)
- Loading branch information
1 parent
a5e772f
commit 0eb0023
Showing
13 changed files
with
410 additions
and
123 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
8 changes: 4 additions & 4 deletions
8
...o/github/springwolf/core/asyncapi/scanners/bindings/channels/ChannelBindingProcessor.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,17 +1,17 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.core.asyncapi.scanners.bindings.channels; | ||
|
||
import java.lang.reflect.Method; | ||
import java.lang.reflect.AnnotatedElement; | ||
import java.util.Optional; | ||
|
||
public interface ChannelBindingProcessor { | ||
|
||
/** | ||
* Process the methods annotated with Channel Binding Annotation | ||
* Process the elements annotated with Channel Binding Annotation | ||
* for protocol specific channelBinding annotations, method parameters, etc | ||
* | ||
* @param method The method being annotated | ||
* @param annotatedElement The element being annotated | ||
* @return A message binding, if found | ||
*/ | ||
Optional<ProcessedChannelBinding> process(Method method); | ||
Optional<ProcessedChannelBinding> process(AnnotatedElement annotatedElement); | ||
} |
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
18 changes: 18 additions & 0 deletions
18
.../src/main/java/io/github/springwolf/examples/cloudstream/configuration/ConsumerClass.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 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.examples.cloudstream.configuration; | ||
|
||
import io.github.springwolf.examples.cloudstream.dtos.ExamplePayloadDto; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.function.Consumer; | ||
|
||
@Slf4j | ||
@Component | ||
public class ConsumerClass implements Consumer<ExamplePayloadDto> { | ||
|
||
@Override | ||
public void accept(ExamplePayloadDto payload) { | ||
log.info("Called with payload: {}", payload); | ||
} | ||
} |
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
15 changes: 13 additions & 2 deletions
15
...ub/springwolf/plugins/cloudstream/asyncapi/scanners/common/FunctionalChannelBeanData.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
Oops, something went wrong.