diff --git a/cs656/lab3/ChordClient.java b/cs656/lab3/ChordClient.java index a484bb7..db57c9e 100644 --- a/cs656/lab3/ChordClient.java +++ b/cs656/lab3/ChordClient.java @@ -43,7 +43,7 @@ public class ChordClient URL localURL = null; try { - localURL = new URL( protocol + "://" + host + ":4242/"); + localURL = new URL( protocol + "://" + host + ":5353/"); } catch (MalformedURLException e) { @@ -71,7 +71,7 @@ public class ChordClient URL localURL = null; try { - localURL = new URL(protocol + "://" + InetAddress.getLocalHost().getHostAddress() + ":4243/"); + localURL = new URL(protocol + "://" + InetAddress.getLocalHost().getHostAddress() + ":5253/"); } catch (MalformedURLException e) { @@ -85,7 +85,7 @@ public class ChordClient URL bootstrapURL = null; try { - bootstrapURL = new URL( protocol + "://" + host + ":4242/"); + bootstrapURL = new URL( protocol + "://" + host + ":5353/"); } catch (MalformedURLException e) { diff --git a/cs656/lab3/PresenceServiceImpl.java b/cs656/lab3/PresenceServiceImpl.java new file mode 100644 index 0000000..3389e69 --- /dev/null +++ b/cs656/lab3/PresenceServiceImpl.java @@ -0,0 +1,41 @@ + +// Author: Josh Holtrop +// Date: 2008-10-30 +// CS656 +// Lab Excersize 3 + +/** + * This class implements the PresenceService interface using Chord. + * It provides a presence service for the chat system. + */ +public class PresenceServiceImpl implements PresenceService +{ + ChordClient myChordClient; + + public PresenceServiceImpl(ChordClient chordClient) + { + myChordClient = chordClient; + } + + /* a user calls this method to register with the presence service */ + public void register(RegistrationInfo reg) + { + } + + /* a user calls this method to unregister with the presence service */ + public void unregister(String userName) + { + } + + /* a user calls this method to get the registration information + * for another user by name */ + public RegistrationInfo lookup(String name) + { + return null; + } + + /* called when a user wishes to leave the network */ + public void leave() + { + } +}