nl.justobjects.pushlet.test
Class SimpleListener

java.lang.Object
  extended by nl.justobjects.pushlet.test.SimpleListener
All Implemented Interfaces:
PushletClientListener, Protocol

public class SimpleListener
extends java.lang.Object
implements PushletClientListener, Protocol

Demonstrates join-listen service. The pushlet protocol supports the "join-listen" service which allows stateless (e.g. RESTful) clients to join/subscribe/listen using a single HTTP request.

Version:
$Id: SimpleListener.java,v 1.3 2005/03/14 14:07:23 justb Exp $
Author:
Just van den Broecke - Just Objects ©

Field Summary
private static java.lang.String MODE
           
private static java.lang.String SUBJECT
           
 
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
SimpleListener(java.lang.String aHost, int aPort)
           
 
Method Summary
static void main(java.lang.String[] args)
          Main program.
 void onAbort(Event theEvent)
          Abort event from server.
 void onData(Event theEvent)
          Data event from server.
 void onError(java.lang.String message)
          Error occurred.
 void onHeartbeat(Event theEvent)
          Heartbeat event from server.
 void p(java.lang.String s)
          Generic print.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBJECT

private static java.lang.String SUBJECT

MODE

private static final java.lang.String MODE
See Also:
Constant Field Values
Constructor Detail

SimpleListener

public SimpleListener(java.lang.String aHost,
                      int aPort)
Method Detail

onError

public void onError(java.lang.String message)
Error occurred.

Specified by:
onError in interface PushletClientListener

onAbort

public void onAbort(Event theEvent)
Abort event from server.

Specified by:
onAbort in interface PushletClientListener

onData

public void onData(Event theEvent)
Data event from server.

Specified by:
onData in interface PushletClientListener

onHeartbeat

public void onHeartbeat(Event theEvent)
Heartbeat event from server.

Specified by:
onHeartbeat in interface PushletClientListener

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.