Server: methods to attach an identity to a server

This commit is contained in:
Sebastian Kaspari 2010-03-13 14:45:45 +01:00
parent d82db7aa38
commit 7ec5499541
1 changed files with 21 additions and 0 deletions

View File

@ -36,6 +36,7 @@ public class Server
private String title;
private String host;
private int port;
private Identity identity;
private HashMap<String, Conversation> conversations = new HashMap<String, Conversation>();
@ -51,6 +52,26 @@ public class Server
this.selected = ServerInfo.DEFAULT_NAME;
}
/**
* Set the identity for this server
*
* @param identity The identity for this server
*/
public void setIdentity(Identity identity)
{
this.identity = identity;
}
/**
* Get the identity for this server
*
* @return identity
*/
public Identity getIdentity()
{
return identity;
}
/**
* Get unique id of server
*