nl.justobjects.pushlet.test
Class StressTester

java.lang.Object
  extended by nl.justobjects.pushlet.test.StressTester
All Implemented Interfaces:
Protocol

public class StressTester
extends java.lang.Object
implements Protocol

Tester to demonstrate Pushlet use in Java applications.

This program does two things: (1) it subscribes to the subject "test/ping" (2) it publishes an Event with subject "/test/ping" every few seconds.

Version:
$Id: StressTester.java,v 1.2 2007/11/09 13:16:57 justb Exp $
Author:
Just van den Broecke - Just Objects ©

Nested Class Summary
private  class StressTester.EventPublisher
           
private  class StressTester.EventSubscriber
           
 
Field Summary
private static java.lang.String host
           
private static long MAX_PUBLISH_INTERVAL_MILLIS
           
private static long MAX_SUBSCRIBER_INTERVAL_MILLIS
           
private static long MIN_PUBLISH_INTERVAL_MILLIS
           
private static long MIN_SUBSCRIBER_INTERVAL_MILLIS
           
private static int port
           
private static java.lang.String SUBJECT
           
private static int TESTER_COUNT
           
 
Fields inherited from interface nl.justobjects.pushlet.core.Protocol
DEFAULT_SERVLET_URI, E_ABORT, E_DATA, E_HEARTBEAT, E_HEARTBEAT_ACK, E_JOIN, E_JOIN_ACK, E_JOIN_LISTEN, E_JOIN_LISTEN_ACK, E_LEAVE, E_LEAVE_ACK, E_LISTEN, E_LISTEN_ACK, E_NACK, E_PUBLISH, E_PUBLISH_ACK, E_REFRESH, E_REFRESH_ACK, E_SUBSCRIBE, E_SUBSCRIBE_ACK, E_UNSUBSCRIBE, E_UNSUBSCRIBE_ACK, FORMAT_JAVASCRIPT, FORMAT_SERIALIZED_JAVA_OBJECT, FORMAT_XML, FORMAT_XML_STRICT, MODE_POLL, MODE_PULL, MODE_STREAM, P_EVENT, P_FORMAT, P_FROM, P_ID, P_MODE, P_REASON, P_SEQ, P_SUBJECT, P_SUBSCRIPTION_ID, P_SUBSCRIPTION_LABEL, P_TIME, P_TO, P_URL, P_WAIT, SUBJECT_META, SUBJECT_META_JOINS, SUBJECT_META_SUBS
 
Constructor Summary
StressTester()
           
 
Method Summary
 void err(java.lang.String s)
          Generic print.
static void main(java.lang.String[] args)
          Main program.
 void p(java.lang.String s)
          Generic print.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

private static java.lang.String host

port

private static int port

TESTER_COUNT

private static int TESTER_COUNT

SUBJECT

private static final java.lang.String SUBJECT
See Also:
Constant Field Values

MIN_PUBLISH_INTERVAL_MILLIS

private static final long MIN_PUBLISH_INTERVAL_MILLIS
See Also:
Constant Field Values

MAX_PUBLISH_INTERVAL_MILLIS

private static final long MAX_PUBLISH_INTERVAL_MILLIS
See Also:
Constant Field Values

MIN_SUBSCRIBER_INTERVAL_MILLIS

private static final long MIN_SUBSCRIBER_INTERVAL_MILLIS
See Also:
Constant Field Values

MAX_SUBSCRIBER_INTERVAL_MILLIS

private static final long MAX_SUBSCRIBER_INTERVAL_MILLIS
See Also:
Constant Field Values
Constructor Detail

StressTester

public StressTester()
Method Detail

run

public void run()

err

public void err(java.lang.String s)
Generic print.


p

public void p(java.lang.String s)
Generic print.


main

public static void main(java.lang.String[] args)
Main program.



Copyright 2000-2003 - Just Objects B.V.