org.abstracthorizon.mercury.smtp.util
Class Path

java.lang.Object
  extended by org.abstracthorizon.mercury.smtp.util.Path

public class Path
extends Object

This class represents path to mailbox. It stores mailbox name and domain and is used for storing JavaMail folder when (if) mailbox is found.

Author:
Daniel Sendula

Constructor Summary
Path()
          Constructor
Path(String mailbox, String domain)
          Constructor
 
Method Summary
 void addReturnPath(String returnPath)
          Adds new element to return path
 boolean equals(Object o)
          Returns true if two objects are same
 String getDomain()
          Returns domain
 javax.mail.Folder getFolder()
          Returns destination folder (or null)
 String getMailbox()
          Returns mailbox
 String[] getReturnPath()
          Returns return path as string array
 int hashCode()
          Returns hash code as sum of mailbox and domain hash codes
 boolean isLocalDomain()
          Returns if it is local domain
 boolean isLocalMailbox()
          Returns true if it is local mailbox
 void setDomain(String domain)
          Sets domain
 void setFolder(javax.mail.Folder folder)
          Sets destination folder
 void setLocalDomain(boolean localDomain)
          Sets if it is local domain
 void setMailbox(String mailbox)
          Sets mailbox
 String toMailboxString()
          Returns string representation
 String toString()
          Returns string representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Path

public Path()
Constructor


Path

public Path(String mailbox,
            String domain)
Constructor

Parameters:
mailbox - mailbox name
domain - mailbox domain
Method Detail

getMailbox

public String getMailbox()
Returns mailbox

Returns:
mailbox

setMailbox

public void setMailbox(String mailbox)
Sets mailbox

Parameters:
mailbox - mailbox

getDomain

public String getDomain()
Returns domain

Returns:
domain

setDomain

public void setDomain(String domain)
Sets domain

Parameters:
domain - domain

getReturnPath

public String[] getReturnPath()
Returns return path as string array

Returns:
return path as string array

addReturnPath

public void addReturnPath(String returnPath)
Adds new element to return path

Parameters:
returnPath - new element to be added

setLocalDomain

public void setLocalDomain(boolean localDomain)
Sets if it is local domain

Parameters:
localDomain - local domain

isLocalDomain

public boolean isLocalDomain()
Returns if it is local domain

Returns:
true if it is local domain

isLocalMailbox

public boolean isLocalMailbox()
Returns true if it is local mailbox

Returns:
true if it is local mailbox

setFolder

public void setFolder(javax.mail.Folder folder)
Sets destination folder

Parameters:
folder - destination folder

getFolder

public javax.mail.Folder getFolder()
Returns destination folder (or null)

Returns:
destination folder

toMailboxString

public String toMailboxString()
Returns string representation

Returns:
string representation

toString

public String toString()
Returns string representation

Overrides:
toString in class Object
Returns:
string representation

hashCode

public int hashCode()
Returns hash code as sum of mailbox and domain hash codes

Overrides:
hashCode in class Object
Returns:
hash code as sum of mailbox and domain hash codes

equals

public boolean equals(Object o)
Returns true if two objects are same

Overrides:
equals in class Object
Parameters:
o - other object
Returns:
true if two objects are same


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.