org.jboss.remoting.samples.config.factories
Class FactoryConfigSSLSample

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.remoting.samples.config.factories.FactoryConfigSSLSample
All Implemented Interfaces:
junit.framework.Test

public class FactoryConfigSSLSample
extends junit.framework.TestCase

These methods illustrate configuring socket factories and server socket factories on the server side and on the client side. The numbered options mentioned refer to the lists of configuration options discussed in the Remoting documentation in the subsections "Server side configuration" and "Client side configuration" of the section called "Socket factories and server socket factories".

The configuration options illustrated in this class are specific to SSL sockets and server sockets. The methods getDefaultServerSocketFactory(), getDefaultSocketFactory(), getDefaultCallbackServerSocketFactory() and getDefaultCallbackSocketFactory() illustrate the use of the class SSLSocketBuilder to create custom SSL socket factories and SSL server socket factories.

Author:
Ron Sigal

Copyright (c) Jul 20, 2006


Constructor Summary
FactoryConfigSSLSample()
           
 
Method Summary
protected  javax.net.ServerSocketFactory getDefaultCallbackServerSocketFactory()
           
protected  javax.net.SocketFactory getDefaultCallbackSocketFactory()
           
protected  javax.net.ServerSocketFactory getDefaultServerSocketFactory()
           
protected  javax.net.SocketFactory getDefaultSocketFactory()
           
protected  java.lang.String getHostName()
           
protected  java.lang.String getKeystoreFilePath()
           
protected  java.lang.String getTransport()
           
protected static java.lang.String getTruststoreFilePath()
           
 void testFactoriesByPassingMBeanInConfig()
          This test illustrates the following set of configuration options:
 void testFactoriesByPassingMBeanInXml()
          This test illustrates the following set of configuration options:
 void testFactoriesFromSSLParameters()
          This test illustrates the following set of configuration options:
 void testFactoriesFromSystemSSLParameters()
          This test illustrates the following set of configuration options:
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryConfigSSLSample

public FactoryConfigSSLSample()
Method Detail

testFactoriesByPassingMBeanInXml

public void testFactoriesByPassingMBeanInXml()
This test illustrates the following set of configuration options:

sidefactoryoption
server sideserver socket4
server sidesocket 4
client sideserver socket1
client sidesocket 1


testFactoriesByPassingMBeanInConfig

public void testFactoriesByPassingMBeanInConfig()
This test illustrates the following set of configuration options:

sidefactoryoption
server sideserver socket6
server sidesocket 5
client sideserver socket1
client sidesocket 1

Note. There is no provision for using an MBeanServer on the client side.


testFactoriesFromSSLParameters

public void testFactoriesFromSSLParameters()
This test illustrates the following set of configuration options:

sidefactoryoption
server sideserver socket8
server sidesocket 8
client sideserver socket6
client sidesocket 5


testFactoriesFromSystemSSLParameters

public void testFactoriesFromSystemSSLParameters()
This test illustrates the following set of configuration options:

sidefactoryoption
server sideserver socket9
server sidesocket 9
client sideserver socket7
client sidesocket 6


getHostName

protected java.lang.String getHostName()

getTransport

protected java.lang.String getTransport()

getKeystoreFilePath

protected java.lang.String getKeystoreFilePath()

getTruststoreFilePath

protected static java.lang.String getTruststoreFilePath()

getDefaultServerSocketFactory

protected javax.net.ServerSocketFactory getDefaultServerSocketFactory()
                                                               throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultSocketFactory

protected javax.net.SocketFactory getDefaultSocketFactory()
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultCallbackServerSocketFactory

protected javax.net.ServerSocketFactory getDefaultCallbackServerSocketFactory()
                                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultCallbackSocketFactory

protected javax.net.SocketFactory getDefaultCallbackSocketFactory()
                                                           throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.