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

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

public class FactoryConfigSample
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 applicable to any kind of socket and server socket, so the SampleServerSocketFactory and SampleSocketFactory classes create ordinary sockets and server sockets.

Author:
Ron Sigal

Copyright (c) Jul 20, 2006


Nested Class Summary
static class FactoryConfigSample.CallbackHandler
           
static class FactoryConfigSample.SampleInvocationHandler
           
static class FactoryConfigSample.SampleServerSocketFactory
           
static class FactoryConfigSample.SampleSocketFactory
           
 
Field Summary
protected static org.jboss.logging.Logger log
           
 
Constructor Summary
FactoryConfigSample()
           
 
Method Summary
protected  javax.net.ServerSocketFactory getDefaultCallbackServerSocketFactory()
           
protected  java.lang.Class getDefaultCallbackServerSocketFactoryClass()
           
protected  javax.net.SocketFactory getDefaultCallbackSocketFactory()
           
protected  java.lang.Class getDefaultCallbackSocketFactoryClass()
           
protected  javax.net.ServerSocketFactory getDefaultServerSocketFactory()
           
protected  java.lang.Class getDefaultServerSocketFactoryClass()
           
protected  javax.net.SocketFactory getDefaultSocketFactory()
           
protected  java.lang.Class getDefaultSocketFactoryClass()
           
protected  java.lang.String getHostName()
           
protected  java.lang.String getTransport()
           
 void testFactoriesByClassNameinConfig()
          This test illustrates the following set of configuration options:
 void testFactoriesByPassingClassnameInXml()
          This test illustrates the following set of configuration options:
 void testFactoriesByPassingInConfig()
          This test illustrates the following set of configuration options:
 void testFactoriesBySettingConnectorAndClient()
          This test illustrates the following set of configuration options:
 void testFactoriesBySettingInvokers()
          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
 

Field Detail

log

protected static org.jboss.logging.Logger log
Constructor Detail

FactoryConfigSample

public FactoryConfigSample()
Method Detail

testFactoriesBySettingInvokers

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

sidefactoryoption
server sideserver socket1
server sidesocket 1
client sideserver socket1
client sidesocket 1


testFactoriesBySettingConnectorAndClient

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

sidefactoryoption
server sideserver socket2
server sidesocket 2
client sideserver socket2
client sidesocket 2


testFactoriesByPassingInConfig

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

sidefactoryoption
server sideserver socket3
server sidesocket 3
client sideserver socket3
client sidesocket 3


testFactoriesByPassingClassnameInXml

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

sidefactoryoption
server sideserver socket5
server sidesocket 6
client sideserver socket4
client sidesocket 1


testFactoriesByClassNameinConfig

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

sidefactoryoption
server sideserver socket7
server sidesocket 7
client sideserver socket5
client sidesocket 4


getTransport

protected java.lang.String getTransport()

getHostName

protected java.lang.String getHostName()

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

getDefaultServerSocketFactoryClass

protected java.lang.Class getDefaultServerSocketFactoryClass()
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultSocketFactoryClass

protected java.lang.Class getDefaultSocketFactoryClass()
                                                throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultCallbackServerSocketFactoryClass

protected java.lang.Class getDefaultCallbackServerSocketFactoryClass()
                                                              throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultCallbackSocketFactoryClass

protected java.lang.Class getDefaultCallbackSocketFactoryClass()
                                                        throws java.lang.Exception
Throws:
java.lang.Exception


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