mail.test
Class TestCommunicator
java.lang.Object
mail.communication.Communicator
mail.test.TestCommunicator
public class TestCommunicator
- extends Communicator
- Author:
- Arne Müller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
web
public static java.util.Hashtable<java.lang.String,TestCommunicator> web
myAddress
private Address myAddress
myNode
private LocalNode myNode
factory
javax.xml.parsers.DocumentBuilderFactory factory
transFactory
javax.xml.transform.TransformerFactory transFactory
testOut
static boolean testOut
nextIndex
private static int nextIndex
TestCommunicator
public TestCommunicator(java.lang.String addrName)
getDocumentBuilder
public javax.xml.parsers.DocumentBuilder getDocumentBuilder()
- Specified by:
getDocumentBuilder
in class Communicator
parseAddress
public Address parseAddress(java.lang.String addr)
- Specified by:
parseAddress
in class Communicator
findMyAddress
public void findMyAddress(Address apeer)
- Specified by:
findMyAddress
in class Communicator
getAddress
public java.util.Collection<Address> getAddress()
- Description copied from class:
Communicator
- returns the Address this Communicator uses to send Packets
- Specified by:
getAddress
in class Communicator
- Returns:
sendPackage
public void sendPackage(CPackage p,
RemoteNode to)
throws IncompatibleAddressException,
NotReachableException,
PackageBuildException
- Specified by:
sendPackage
in class Communicator
- Throws:
IncompatibleAddressException
NotReachableException
PackageBuildException
attachNode
public void attachNode(LocalNode l)
- Specified by:
attachNode
in class Communicator
enable
public void enable()
disable
public void disable()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
print_debug
private void print_debug(org.w3c.dom.Document d)
sendPackage
public void sendPackage(CPackage p,
Address to)
throws IncompatibleAddressException,
java.io.IOException,
PackageBuildException
- Specified by:
sendPackage
in class Communicator
- Throws:
IncompatibleAddressException
java.io.IOException
PackageBuildException
receivePackage
public void receivePackage(java.io.InputStream p,
Address from)
throws IncompatibleAddressException,
java.io.IOException
- Throws:
IncompatibleAddressException
java.io.IOException
spawn
private static RemoteNode spawn(Communicator c)
throws EncSupplyException
- Throws:
EncSupplyException
testConnections
public void testConnections()
throws EncSupplyException
- Throws:
EncSupplyException
main
public static void main(java.lang.String[] args)
isOpen
public boolean isOpen()
- Specified by:
isOpen
in class Communicator
close
public void close()
- Specified by:
close
in class Communicator
write
public void write(org.w3c.dom.Document d,
java.io.File f)
throws javax.xml.transform.TransformerException
- Specified by:
write
in class Communicator
- Throws:
javax.xml.transform.TransformerException