-
Notifications
You must be signed in to change notification settings - Fork 216
Add IceBox Greeter Java demo #610
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new IceBox Greeter Java demo to the repository, implementing a complete client-server application using the Ice framework's IceBox service container architecture.
- Implements a complete IceBox service demo with client, service, and server components
- Provides Java implementation of the Greeter interface using Ice/IceBox framework
- Includes proper Gradle build configuration with multi-project structure
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| java/IceBox/greeter/slice/Greeter.ice | Defines the Slice interface for the Greeter service |
| java/IceBox/greeter/service/src/main/java/com/example/icebox/greeter/service/GreeterService.java | IceBox service implementation that manages the Greeter adapter |
| java/IceBox/greeter/service/src/main/java/com/example/icebox/greeter/service/Chatbot.java | Concrete implementation of the Greeter interface |
| java/IceBox/greeter/client/src/main/java/com/example/icebox/greeter/client/Client.java | Client application that connects to the Greeter service |
| java/IceBox/greeter/settings.gradle.kts | Root Gradle settings defining the multi-project structure |
| java/IceBox/greeter/service/build.gradle.kts | Build configuration for the service module |
| java/IceBox/greeter/client/build.gradle.kts | Build configuration for the client module |
| java/IceBox/greeter/iceboxserver/build.gradle.kts | Build configuration for the IceBox server launcher |
| java/IceBox/greeter/README.md | Documentation explaining how to build and run the demo |
| java/IceBox/greeter/.gitignore | Git ignore file for Gradle artifacts |
| java/IceBox/greeter/gradlew* | Gradle wrapper scripts and properties |
| import com.zeroc.Ice.Communicator; | ||
| import com.zeroc.Ice.Util; | ||
|
|
||
| import java.util.concurrent.CompletableFuture; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra imports
| */ | ||
| class Chatbot implements Greeter { | ||
| // Implements the abstract method 'greet' from the Greeter interface generated by the Slice compiler. | ||
| // This variant is the synchronous implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No variant here.
|
|
||
| - client — the client application (uses the Gradle [application plugin]). | ||
| - service — the Greeter service implementation (uses the [java-library plugin]). | ||
| - iceboxserver — the IceBox launcher (uses the Gradle [application plugin]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused, so I guess users would be confused too.
iceboxserver is not something we ship, but an "application plugin" wrapper for the IceBox JAR that we build in this demo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates a Gradle Application, that uses IceBox Server as is main entry point, and has the service class in its runtime path.
You can also download icebox-xxx.jar from maven, and use java command directly but instructions will be quite more complicated.
We did something similar in 3.7, but I think is even simpler using the Gradle application plug-in. I will try to improve the comments for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note in the README to explain this.
The IceBox/greeter demo port to Java.