network
Class NetworkService

java.lang.Object
  extended by network.NetworkService

public abstract class NetworkService
extends Object


Field Summary
(package private)  Communication communication
           
(package private)  MessagingService messagingService
           
 
Constructor Summary
NetworkService()
           
 
Method Summary
abstract  void authenticateDevice(Device device)
          Sends device information to the Authentication Service in order to authenticate the device.
abstract  void authenticateUser(Account account, String credentials)
          Sends user credentials to the Authentication Service in order to authenticate the user (necessary when the user logs in).
protected abstract  void checkForConnectivity()
           
abstract  void contactRemoteService(DiscoveryServiceRequest request)
          Sends the given request to the remote Discovery Service.
abstract  void contactRemoteService(Message message)
          Send the given request to the remote Naming Service.
abstract  void contactRemoteService(NamingServiceRequest request)
          Sends the given request to the remote Naming Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messagingService

MessagingService messagingService

communication

Communication communication
Constructor Detail

NetworkService

public NetworkService()
Method Detail

contactRemoteService

public abstract void contactRemoteService(DiscoveryServiceRequest request)
Sends the given request to the remote Discovery Service.

Parameters:
request - - the request, its type and content as described in the user stories

contactRemoteService

public abstract void contactRemoteService(NamingServiceRequest request)
Sends the given request to the remote Naming Service.

Parameters:
request - - the request, its type and content as described in the user stories

contactRemoteService

public abstract void contactRemoteService(Message message)
Send the given request to the remote Naming Service.

Parameters:
message - - the message sent by the logged-in user to another user.

authenticateDevice

public abstract void authenticateDevice(Device device)
Sends device information to the Authentication Service in order to authenticate the device.

Parameters:
device -

authenticateUser

public abstract void authenticateUser(Account account,
                                      String credentials)
Sends user credentials to the Authentication Service in order to authenticate the user (necessary when the user logs in).

Parameters:
account - - the use's account information
credentials - - the password the user input or some other form of security credentials

checkForConnectivity

protected abstract void checkForConnectivity()