The Artima Developer Community
Sponsored Link

Java Answers Forum
chat - client server problem!!!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
john smith

Posts: 2
Nickname: county02
Registered: Nov, 2002

chat - client server problem!!! Posted: Nov 26, 2002 5:59 AM
Reply to this message Reply
Advertisement
hello, i have a program to write and make ammendments to but iam hopeless at java, can anyone help me?

this file i think creates an interface between the cline t and the server, i have been told that only one of the interfaces has been created and i have to create the other, and that its not a lot of code. can anyone tell me how to do this?



import java.rmi.Remote;
import java.rmi.RemoteException;


/**
* Remote interface for a chat service.
*
* @author Nick Efford
* @version 1.0 (2002-11-06)
*/

public interface ChatService extends Remote {

/**
* Registers a client with the chat service.
*
* @param client ChatClient to be registered
* @return true if registration succeeds, false if client
* is already registered
* @throws RemoteException if remote invocation fails
*/

public boolean addClient(ChatClient client) throws RemoteException;

/**
* Removes a client, so they will no longer receive messages.
*
* @param client ChatClient to be removed
* @return true if removal succeeds, false if client wasn't
* already registered
* @throws RemoteException if remote invocation fails
*/

public boolean removeClient(ChatClient client) throws RemoteException;

/**
* Distributes a message from one client to all clients
* registered with the service.
*
* @param sender ChatClient from whom message originates
* @param message string of text to be sent to all clients
* @throws ChatException if sender is not registered with service
* @throws RemoteException if remote invocation fails
*/

public void sendMessage(ChatClient sender, String message)
throws ChatException, RemoteException;

}

Topic: PIV Hyperthreading & Java Previous Topic   Next Topic Topic: What is

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use