org.mule.test.firewall
Class FirewallTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.test.firewall.FirewallTestCase

public class FirewallTestCase
extends AbstractMuleTestCase


Field Summary
static String LOCALADDR
           
static String LOCALHOST
           
protected  Log logger
           
static int TEST_COUNT
           
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleTestCase
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, name, TEST_TIMEOUT_SYSTEM_PROPERTY
 
Constructor Summary
FirewallTestCase()
           
 
Method Summary
protected  String addressToString(InetAddress address)
           
protected  String addressToString(InetAddress address, int port)
           
protected  void consistentAddress(String name, boolean canonical)
           
protected  void doTestTcp(InetAddress address, int port)
           
protected  void doTestUdp(InetAddress address, int port)
           
protected  String name(InetAddress address, boolean canonical)
           
protected  Socket openTcpClient(InetAddress address, int port)
           
protected  ServerSocket openTcpServer(InetAddress address, int port)
           
protected  DatagramSocket openUdpClient()
           
protected  DatagramSocket openUdpServer(InetAddress address, int port)
           
protected  int randomPort(int lo, int hi)
           
protected  int randomPrivatePort()
           
 void testCanonicalHost()
           
 void testHostnameTcp()
           
 void testHostnameUdp()
           
 void testLocalHost()
           
 void testLocalhostTcp()
           
 void testLocalhostUdp()
           
 void testLoopback()
           
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleTestCase
clearExcludedFlag, clearRequestContext, createTestTimeoutRule, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALHOST

public static final String LOCALHOST
See Also:
Constant Field Values

LOCALADDR

public static final String LOCALADDR
See Also:
Constant Field Values

TEST_COUNT

public static final int TEST_COUNT
See Also:
Constant Field Values

logger

protected final Log logger
Constructor Detail

FirewallTestCase

public FirewallTestCase()
Method Detail

testLoopback

public void testLoopback()
                  throws Exception
Throws:
Exception

testLocalHost

public void testLocalHost()
                   throws Exception
Throws:
Exception

testCanonicalHost

public void testCanonicalHost()
                       throws Exception
Throws:
Exception

consistentAddress

protected void consistentAddress(String name,
                                 boolean canonical)
                          throws UnknownHostException
Throws:
UnknownHostException

name

protected String name(InetAddress address,
                      boolean canonical)

testLocalhostTcp

public void testLocalhostTcp()
                      throws Exception
Throws:
Exception

testHostnameTcp

public void testHostnameTcp()
                     throws Exception
Throws:
Exception

testLocalhostUdp

public void testLocalhostUdp()
                      throws Exception
Throws:
Exception

testHostnameUdp

public void testHostnameUdp()
                     throws Exception
Throws:
Exception

doTestTcp

protected void doTestTcp(InetAddress address,
                         int port)
                  throws Exception
Throws:
Exception

doTestUdp

protected void doTestUdp(InetAddress address,
                         int port)
                  throws Exception
Throws:
Exception

openTcpClient

protected Socket openTcpClient(InetAddress address,
                               int port)
                        throws IOException
Throws:
IOException

openTcpServer

protected ServerSocket openTcpServer(InetAddress address,
                                     int port)
                              throws IOException
Throws:
IOException

openUdpServer

protected DatagramSocket openUdpServer(InetAddress address,
                                       int port)
                                throws IOException
Throws:
IOException

openUdpClient

protected DatagramSocket openUdpClient()
                                throws IOException
Throws:
IOException

addressToString

protected String addressToString(InetAddress address,
                                 int port)

addressToString

protected String addressToString(InetAddress address)

randomPrivatePort

protected int randomPrivatePort()

randomPort

protected int randomPort(int lo,
                         int hi)
Parameters:
lo -
hi -
Returns:
A number between lo and hi (inclusive)


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.