Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Net4j/Using Net4j example

< Net4j
Revision as of 15:19, 17 November 2013 by Unnamed Poltroon (Talk)

Getting started Net4j Buddies Example

Introduction:

This tutorial will help you to start working with a Net4j buddies example application. This tutorial was built on Eclipse 4.2(Kepler).

Set up Eclipse

We will start by downloading fresh Modeling version Eclipse installation. The reason why we chose Modelling version Eclipse installation is that, it already Net4j Signalling platform and some other plugins required for running the Net4j Buddies Example in it.

Importing the Net4j Buddies Example Projects

In order to import the Net4j Buddies example, open the “New Project” wizard (File -> New) and select the “Net4j Chat Buddies Example” as shown below. Then click “Finish”. This will import the Net4j Chat Buddies Example projects into your workspace.

File:C:\Users\Uma\Desktop\1.png

Running the Example Project

The Example project imported into your workspace already has “Net4j Server” and “Net4j Client” Run Configurations. First Run the Server and then the clients. Before running the server and client configurations, please make sure that you have pressed the “Add Required Plug-ins” button. The “Buddies Server” configuration also depends on the plugin “org.eclipse.emf.cdo.server.net4j”, which is not selected in the Plug-ins tab. So select this plugin and press the “Add Required Plug-ins” button again, in order to make sure that, you do not miss any of the required plug-ins.

File:2

Now, Run the BuddiesServer configuration, which should start the Net4j Server. If the server is successfully started, then you could verify that in the console as shown below.

File:3

Then Run the Client configurations. We need to run at least two clients, in order to demonstrate Chatting between them. When the clients are started, go to the “Preference”(windows-> preference) and then select the Buddies settings as shown in the following figure. At this point, please make sure that you have unique “User ID” in the clients(Password is optional).

File:4

Connecting to Chat Server

In order to get connected to the chat server, open the “Collaborations View”(Window -> Show View -> Other -> Net4j Buddies -> Collaborations). In the collaborations view, click “Connect” as shown below. Make sure that, at least two clients are connected to the server.

File:5

Now, open the “Buddies View” ”(Window -> Show View -> Other -> Net4j Buddies -> Buddies). In this view, each client can see the other client’s presence, which is represented by the UserIDs. Hence Client1 can see Client2 and vice versa as shown below.

File:6

In order to chat with another client, click on their name, which is in the “Buddies View” and start sending message to them in the collaborations view, as shown below.

File:7

Back to the top