public class TvIoWwgt
extends java.applet.Applet
Provides networking for JavaScript in Html pages.
Notes:
IE Javascript limitations (IE 5.x, 6.x):
1 IE is unable to recognize String arrays
returned from java.
2 IE sometimes interprets a null string returned from java
as an empty string.
java.applet.Applet.AccessibleApplet| Modifier and Type | Field and Description |
|---|---|
protected static java.awt.Color |
closedBgColor
Connection closed background color
|
static java.lang.String[] |
DEP_LIST
Class dependencies
|
protected static java.awt.Color |
errorBgColor
Error background color
|
protected static java.awt.Color |
goodBgColor
Good connection background color
|
protected static java.awt.Color |
initBgColor
Applet initializing background color
|
static int |
MODE_CHANNEL
EventWeb Backchannel
|
static int |
MODE_GET
HTTP Get
|
static int |
MODE_NONE
No mode specified
|
static int |
MODE_POST
HTTP Post
|
static int |
STS_CLOSED
Closed by client
|
static int |
STS_CLOSING
(Client) Closing connection
|
static int |
STS_DISCONN
Disconnected by server
|
static int |
STS_ERROR
Error condition
|
static int |
STS_INIT
Initializing
|
static int |
STS_LISTENING
Listening for messages
|
static int |
STS_OPEN
Open to send and receive
|
static int |
STS_OPENING
Opening connection
|
static int |
STS_WARNING
Warning condition
|
static java.lang.String |
VERSION
Class version
|
protected static java.awt.Color |
warningBgColor
Warning background color
|
| Constructor and Description |
|---|
TvIoWwgt()
Create a new TvIoWwgt.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
buildCmpMsg(java.lang.String tag,
java.lang.String value)
Add a tag-value pair to the current compound message.
|
boolean |
closeUrl()
Disconnect from URL.
|
boolean |
dataIsAvailable()
Determine if there is data available.
|
void |
destroy()
Release all non-memory resources held by the applet.
|
java.lang.String |
getAppletInfo()
Get information about this applet.
|
java.lang.String[][] |
getParameterInfo()
Get parameter info for this applet.
|
int |
getStatus()
Get connection status
|
java.lang.String |
getTag()
Get the tag from the next message with an unread tag.
|
java.lang.String |
getValue()
Get the value from the next message with an unread value.
|
void |
init()
Initialize the applet.
|
boolean |
isWaitingForData()
Determine if processing is needed.
|
boolean |
openUrl(java.lang.String urlName)
Connect to URL in default communication mode
|
boolean |
openUrl(java.lang.String urlName,
int mode)
Connect to URL
The URL is opened asynchronously. |
boolean |
openUrlSynch(java.lang.String urlName,
int mode)
Connect to URL Synchronously.
|
boolean |
recHasMore()
Determine if there is more data in the current record.
|
static java.lang.String |
removeTags(java.lang.String sVal)
Remove tags from HTML.
|
boolean |
retry()
Retry a lost URL connection.
|
boolean |
sendCmpMsg()
Send the current commpound message and then clear it.
|
boolean |
sendMsg(java.lang.String tag,
java.lang.String value)
Send a message with a single tag-value pair.
|
protected void |
startThread()
Start the listener thread execution loop.
|
protected void |
stopThread()
Stop the listener thread execution loop.
|
static java.lang.String |
textualizeHtml(java.lang.String sVal)
Encode HTML so it will be displayed as plain text in a browser.
|
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stopadd, 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, transferFocusDownCycle, update, validate, validateTreeaction, 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, revalidate, 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, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String VERSION
public static final java.lang.String[] DEP_LIST
public static final int MODE_NONE
public static final int MODE_GET
public static final int MODE_POST
public static final int MODE_CHANNEL
public static final int STS_ERROR
public static final int STS_WARNING
public static final int STS_INIT
public static final int STS_DISCONN
public static final int STS_CLOSED
public static final int STS_CLOSING
public static final int STS_OPENING
public static final int STS_OPEN
public static final int STS_LISTENING
protected static final java.awt.Color initBgColor
protected static final java.awt.Color closedBgColor
protected static final java.awt.Color goodBgColor
protected static final java.awt.Color warningBgColor
protected static final java.awt.Color errorBgColor
public static java.lang.String textualizeHtml(java.lang.String sVal)
sVal - The (HTML) string to be encodedpublic static java.lang.String removeTags(java.lang.String sVal)
sVal - The (HTML) string to be processedpublic void init()
init in class java.applet.Appletpublic void destroy()
destroy in class java.applet.Appletpublic java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic java.lang.String[][] getParameterInfo()
getParameterInfo in class java.applet.Appletpublic boolean openUrl(java.lang.String urlName)
urlName - URL to connect topublic boolean openUrl(java.lang.String urlName,
int mode)
urlName - URL to connect tomode - Communication mode for the channelpublic boolean openUrlSynch(java.lang.String urlName,
int mode)
urlName - URL to connect tomode - Communication mode for the channelpublic boolean retry()
public boolean closeUrl()
public boolean sendMsg(java.lang.String tag,
java.lang.String value)
tag - Tag for messagevalue - Value for messagepublic boolean buildCmpMsg(java.lang.String tag,
java.lang.String value)
tag - Tag for pair to add to messagevalue - Value for pair to add to messagepublic boolean sendCmpMsg()
public java.lang.String getTag()
public java.lang.String getValue()
public boolean isWaitingForData()
public boolean dataIsAvailable()
public boolean recHasMore()
public int getStatus()
protected void startThread()
protected void stopThread()