mail
Class User

java.lang.Object
  extended by mail.User

public class User
extends java.lang.Object


Field Summary
private static java.lang.String ADDRESSBOOK
           
private static java.lang.String ARCHIVE
           
private  InetCommunicator comm
           
private static java.lang.String COMM_PROPS
           
private  EncSupply enc
           
private  Addressbook friends
           
private static java.lang.String MAIL_STORE
           
private  MailArchive mails
           
private  LocalNode me
           
private static java.lang.String NAME_STORE
           
 
Constructor Summary
User(java.io.File basedir, EncSupply enc)
          loads a user from specified directory.
 
Method Summary
 boolean bootstrap()
           
 java.util.Collection<? extends Address> getAddress()
           
 Communicator getCommunicator()
           
 Addressbook getFriends()
           
 LocalNode getLocalNode()
           
 MailArchive getMails()
           
 MailStore getMailStore()
           
 boolean isConnectionOpen()
           
 void openConnection(int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL_STORE

private static final java.lang.String MAIL_STORE
See Also:
Constant Field Values

NAME_STORE

private static final java.lang.String NAME_STORE
See Also:
Constant Field Values

ADDRESSBOOK

private static final java.lang.String ADDRESSBOOK
See Also:
Constant Field Values

ARCHIVE

private static final java.lang.String ARCHIVE
See Also:
Constant Field Values

COMM_PROPS

private static final java.lang.String COMM_PROPS
See Also:
Constant Field Values

comm

private InetCommunicator comm

me

private LocalNode me

friends

private Addressbook friends

mails

private MailArchive mails

enc

private EncSupply enc
Constructor Detail

User

public User(java.io.File basedir,
            EncSupply enc)
     throws EncSupplyException,
            LoadingException
loads a user from specified directory. If the directory doesn't exist, a new user is created

Parameters:
basedir -
Throws:
EncSupplyException
LoadingException
Method Detail

getLocalNode

public LocalNode getLocalNode()
Returns:
the Local Node

getFriends

public Addressbook getFriends()
Returns:
the friends

getMails

public MailArchive getMails()
Returns:
the mail-archive

getMailStore

public MailStore getMailStore()

getAddress

public java.util.Collection<? extends Address> getAddress()

getCommunicator

public Communicator getCommunicator()

isConnectionOpen

public boolean isConnectionOpen()

openConnection

public void openConnection(int port)
                    throws java.io.IOException
Throws:
java.io.IOException

bootstrap

public boolean bootstrap()