|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmail.Mail
public abstract class Mail
Field Summary | |
---|---|
protected java.lang.String |
id
|
private static java.util.Hashtable<java.lang.String,java.lang.Class<? extends Mail>> |
mailTypes
|
protected ID |
receiver
|
Constructor Summary | |
---|---|
Mail(ID receiver)
creates a new Mail. |
Method Summary | |
---|---|
abstract void |
build(org.w3c.dom.Element e)
|
abstract org.w3c.dom.Element |
buildContent(org.w3c.dom.Document d)
builds an XML-Element out of this Mail |
static Mail |
buildMail(org.w3c.dom.Element e)
builds a mail out of an XML-Element |
boolean |
equals(java.lang.Object o)
two mails are equal, if and only if their ID and receiver matches |
java.lang.String |
getID()
|
ID |
getReceiver()
returns the receiver of this mail, this method should never return null |
abstract ID |
getSender()
returns the sender of this mail. |
int |
hashCode()
the hashcode only depends on the random-id-string generated by creation and the receiver |
protected static void |
registerPackage(java.lang.Class<? extends Mail> c,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.Hashtable<java.lang.String,java.lang.Class<? extends Mail>> mailTypes
protected ID receiver
protected java.lang.String id
Constructor Detail |
---|
public Mail(ID receiver)
receiver
- Method Detail |
---|
public ID getReceiver()
public abstract ID getSender()
public java.lang.String getID()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public abstract org.w3c.dom.Element buildContent(org.w3c.dom.Document d) throws MailBuildException
d
- the document to place the element into
MailBuildException
public abstract void build(org.w3c.dom.Element e) throws MailBuildException
MailBuildException
public static Mail buildMail(org.w3c.dom.Element e) throws MailBuildException
e
- the XML-Element
MailBuildException
protected static void registerPackage(java.lang.Class<? extends Mail> c, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |