xmlBlaster 2.1.0 API

org.xmlBlaster.client.protocol.http.applet
Class XmlBlasterAccessRaw

java.lang.Object
  extended by org.xmlBlaster.client.protocol.http.common.XmlBlasterAccessRawBase
      extended by org.xmlBlaster.client.protocol.http.applet.XmlBlasterAccessRaw
All Implemented Interfaces:
I_XmlBlasterAccessRaw

public class XmlBlasterAccessRaw
extends XmlBlasterAccessRawBase

A java client implementation to access xmlBlaster using a persistent http connection for instant callback messages.

You can control logging with the Applet PARAM tag, logging output is put to the Java console of your browser:

 <PARAM name="xmlBlaster/logLevels" value="ERROR,WARN">
 with more logging:
 <PARAM name="xmlBlaster/logLevels" value="ERROR,WARN,INFO,DEBUG">
 
See the example applet HelloWorld3 on how to use it.

Author:
Marcel Ruff
See Also:
HelloWorld3

Field Summary
 
Fields inherited from class org.xmlBlaster.client.protocol.http.common.XmlBlasterAccessRawBase
instanceCount, logLevels, logListener, ONEWAY, properties, xmlBlasterServletUrl
 
Fields inherited from interface org.xmlBlaster.client.protocol.http.common.I_XmlBlasterAccessRaw
CONNECT_NAME, CREATE_SESSIONID_NAME, DISCONNECT_NAME, ERASE_NAME, EXCEPTION_NAME, GET_NAME, PING_NAME, PONG_NAME, PUBLISH_NAME, SUBSCRIBE_NAME, UNSUBSCRIBE_NAME, UPDATE_NAME
 
Constructor Summary
XmlBlasterAccessRaw(java.applet.Applet applet)
          Provides access to xmlBlaster server.
XmlBlasterAccessRaw(java.applet.Applet applet, java.util.Hashtable properties)
          Provides access to xmlBlaster server.
XmlBlasterAccessRaw(java.util.Hashtable properties)
          Provides access to xmlBlaster server.
 
Method Summary
 I_Connection createConnection(java.lang.String urlString)
          Creates a connection to the specified servlet.
 byte[] decodeBase64(java.lang.String data)
          decodes binary data to Base64.
 java.lang.String encodeBase64(byte[] data)
          This notation is URLEncoder since JDK 1.4.
private static java.util.Hashtable parseAppletParameter(java.applet.Applet applet, java.util.Hashtable additionalProperties)
          Parse the applet parameter from the HTML page.
 
Methods inherited from class org.xmlBlaster.client.protocol.http.common.XmlBlasterAccessRawBase
connect, disconnect, erase, extractCookies, get, getHtmlProperties, getInstanceCount, getInstanceId, getXmlBlasterServletUrl, isConnected, isConnected, log, log, ping, publish, readCookie, sendXmlScript, setLogListener, subscribe, unSubscribe, update, writeCookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlBlasterAccessRaw

public XmlBlasterAccessRaw(java.applet.Applet applet)
Provides access to xmlBlaster server.

Parameters:
applet - My environment
See Also:
parseAppletParameter(java.applet.Applet, java.util.Hashtable)

XmlBlasterAccessRaw

public XmlBlasterAccessRaw(java.applet.Applet applet,
                           java.util.Hashtable properties)
Provides access to xmlBlaster server.

Parameters:
applet - My environment
properties - Additional properties to send to the servlet They must start with "servlet/xyz=someValue". The "servlet/" will be stripped away and in the web-servlet will arrive "xyz=someValue". The key/values are send in the URL.
See Also:
parseAppletParameter(java.applet.Applet, java.util.Hashtable)

XmlBlasterAccessRaw

public XmlBlasterAccessRaw(java.util.Hashtable properties)
Provides access to xmlBlaster server.

See Also:
parseAppletParameter(java.applet.Applet, java.util.Hashtable)
Method Detail

parseAppletParameter

private static java.util.Hashtable parseAppletParameter(java.applet.Applet applet,
                                                        java.util.Hashtable additionalProperties)
Parse the applet parameter from the HTML page.

As the applet class has no getAllParameters() method we expect a PARAM deliveredParamKeys which contains a list of all delivered PARAM in the HTML page.

See Also:
XmlBlasterAccessRawBase.getHtmlProperties()

encodeBase64

public java.lang.String encodeBase64(byte[] data)
This notation is URLEncoder since JDK 1.4. To avoid deprecation warnings at many places and support JDK < 1.4 we provide it here and simply map it to the old encode(String)

Specified by:
encodeBase64 in class XmlBlasterAccessRawBase
Returns:

decodeBase64

public byte[] decodeBase64(java.lang.String data)
Description copied from class: XmlBlasterAccessRawBase
decodes binary data to Base64. The returned bytes are all text characters.

Specified by:
decodeBase64 in class XmlBlasterAccessRawBase
Returns:

createConnection

public I_Connection createConnection(java.lang.String urlString)
                              throws java.lang.Exception
Description copied from interface: I_XmlBlasterAccessRaw
Creates a connection to the specified servlet.

Specified by:
createConnection in interface I_XmlBlasterAccessRaw
Specified by:
createConnection in class XmlBlasterAccessRawBase
Returns:
Throws:
java.lang.Exception

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.