nl.justobjects.pushlet.test
Class PushletApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by nl.justobjects.pushlet.test.PushletApplet
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, PushletClientListener, Protocol

public class PushletApplet
extends java.applet.Applet
implements PushletClientListener, Protocol

Tester for applet clients; displays incoming events in text area.

Version:
$Id: PushletApplet.java,v 1.16 2005/02/18 09:54:15 justb Exp $
Author:
Just van den Broecke - Just Objects ©
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.lang.String host
           
private  int port
           
private  java.lang.String PUSH_MODE
           
private  PushletClient pushletClient
           
private  java.lang.String subject
           
private  java.awt.TextArea textArea
           
private  java.lang.String VERSION
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PushletApplet()
           
 
Method Summary
private  void bailout()
           
private  void dbg(java.lang.String s)
          Generic print.
 void init()
          One-time setup.
 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.
private  void p(java.lang.String s)
          Generic print.
 void start()
           
 void stop()
           
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

textArea

private java.awt.TextArea textArea

host

private java.lang.String host

port

private int port

subject

private java.lang.String subject

pushletClient

private PushletClient pushletClient

VERSION

private java.lang.String VERSION

PUSH_MODE

private java.lang.String PUSH_MODE
Constructor Detail

PushletApplet

public PushletApplet()
Method Detail

init

public void init()
One-time setup.

Overrides:
init in class java.applet.Applet

start

public void start()
Overrides:
start in class java.applet.Applet

stop

public void stop()
Overrides:
stop in class java.applet.Applet

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

onError

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

Specified by:
onError in interface PushletClientListener

bailout

private void bailout()

p

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


dbg

private void dbg(java.lang.String s)
Generic print.



Copyright 2000-2003 - Just Objects B.V.