updated ChordClient.java, added PresenceServiceImpl.java
git-svn-id: svn://anubis/gvsu@219 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
613d3b2ff4
commit
463a762315
@ -43,7 +43,7 @@ public class ChordClient
|
|||||||
URL localURL = null;
|
URL localURL = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
localURL = new URL( protocol + "://" + host + ":4242/");
|
localURL = new URL( protocol + "://" + host + ":5353/");
|
||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ public class ChordClient
|
|||||||
URL localURL = null;
|
URL localURL = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
localURL = new URL(protocol + "://" + InetAddress.getLocalHost().getHostAddress() + ":4243/");
|
localURL = new URL(protocol + "://" + InetAddress.getLocalHost().getHostAddress() + ":5253/");
|
||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ public class ChordClient
|
|||||||
URL bootstrapURL = null;
|
URL bootstrapURL = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bootstrapURL = new URL( protocol + "://" + host + ":4242/");
|
bootstrapURL = new URL( protocol + "://" + host + ":5353/");
|
||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
|
41
cs656/lab3/PresenceServiceImpl.java
Normal file
41
cs656/lab3/PresenceServiceImpl.java
Normal file
@ -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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user