org.cometd
Class AbstractCometdTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.cometd.AbstractCometdTest
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractCometdTest
extends junit.framework.TestCase

Version:
$Revision: 1483 $ $Date: 2009-03-04 14:56:47 +0100 (Wed, 04 Mar 2009) $

Field Summary
protected  java.lang.String cometdURL
           
protected  java.lang.String cometServletPath
           
protected  java.lang.String contextURL
           
protected  int longPollingPeriod
           
protected  int port
           
 
Constructor Summary
AbstractCometdTest()
           
 
Method Summary
protected  void customizeBayeux(BayeuxServerImpl bayeux)
           
protected abstract  void customizeContext(org.eclipse.jetty.servlet.ServletContextHandler context)
           
protected  void defineClass(java.lang.Class clazz)
           
 void destroyCometServer()
           
 void destroyJavaScript()
           
protected
<T> T
evaluateScript(java.lang.String script)
           
protected  void evaluateURL(java.net.URL script)
           
protected
<T> T
get(java.lang.String name)
           
protected  int getMaxConnections()
           
 void initCometServer()
           
 void initJavaScript()
           
static java.lang.Object jsToJava(java.lang.Object jsObject)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

port

protected int port

contextURL

protected java.lang.String contextURL

cometServletPath

protected java.lang.String cometServletPath

cometdURL

protected java.lang.String cometdURL

longPollingPeriod

protected int longPollingPeriod
Constructor Detail

AbstractCometdTest

public AbstractCometdTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

initCometServer

public void initCometServer()
                     throws java.lang.Exception
Throws:
java.lang.Exception

initJavaScript

public void initJavaScript()
                    throws java.lang.Exception
Throws:
java.lang.Exception

getMaxConnections

protected int getMaxConnections()
Returns:
the max number of connections that the simulated browser environment can open for each different server address (default is 2).

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

destroyJavaScript

public void destroyJavaScript()
                       throws java.lang.Exception
Throws:
java.lang.Exception

destroyCometServer

public void destroyCometServer()
                        throws java.lang.Exception
Throws:
java.lang.Exception

customizeContext

protected abstract void customizeContext(org.eclipse.jetty.servlet.ServletContextHandler context)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

customizeBayeux

protected void customizeBayeux(BayeuxServerImpl bayeux)

evaluateURL

protected void evaluateURL(java.net.URL script)
                    throws java.io.IOException
Throws:
java.io.IOException

evaluateScript

protected <T> T evaluateScript(java.lang.String script)

defineClass

protected void defineClass(java.lang.Class clazz)
                    throws java.lang.reflect.InvocationTargetException,
                           java.lang.InstantiationException,
                           java.lang.IllegalAccessException
Throws:
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException

get

protected <T> T get(java.lang.String name)

jsToJava

public static java.lang.Object jsToJava(java.lang.Object jsObject)


Copyright © 2010 Dojo Foundation. All Rights Reserved.