Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to retreive grpc service instance from context #21

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

isengrims
Copy link
Contributor

No description provided.

Copy link
Contributor

@cordwelt cordwelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also bump version and update changelog in readme

@@ -32,6 +33,7 @@ class HandlerContext(
private val channelFactory: ChannelFactory,
private val getDictionary: (DictionaryType) -> InputStream,
private val sendEvent: (Event) -> Unit,
private val grpcRouter: GrpcRouter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's pass a method reference instead of the whole router

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How? We don't have common interface for service classes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How?

We can do smth like this, but we'll have to do an unchecked cast later

Suggested change
private val grpcRouter: GrpcRouter
private val getService: (Class<out Any>) -> Any

@@ -32,6 +33,7 @@ class HandlerContext(
private val channelFactory: ChannelFactory,
private val getDictionary: (DictionaryType) -> InputStream,
private val sendEvent: (Event) -> Unit,
private val grpcRouter: GrpcRouter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How?

We can do smth like this, but we'll have to do an unchecked cast later

Suggested change
private val grpcRouter: GrpcRouter
private val getService: (Class<out Any>) -> Any

README.md Outdated Show resolved Hide resolved
Denis Plotnikov and others added 2 commits February 9, 2023 11:50
Co-authored-by: Ivan Druzhinin <46186068+ivandruzhinin@users.noreply.github.com>
Copy link
Contributor

@cordwelt cordwelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge with squash

@isengrims isengrims merged commit f6c20a9 into dev-version-2 Feb 10, 2023
@isengrims isengrims deleted the ts-1225 branch February 10, 2023 08:20
isengrims added a commit that referenced this pull request Feb 15, 2023
* allow to retrieve gRPC service from handler context
* support JSR-310 date and time types in settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants