Skip to content

Conversation

@pepone
Copy link
Member

@pepone pepone commented Sep 25, 2025

The IceBox/greeter demo port to Java.

Copy link

Copilot AI left a 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;
Copy link
Member

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.
Copy link
Member

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]).
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

@pepone pepone merged commit c317167 into zeroc-ice:main Sep 26, 2025
13 of 14 checks passed
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.

3 participants