xmlBlaster 2.2.0 API

org.xmlBlaster.protocol.http
Class BlasterHttpProxy

java.lang.Object
  extended by org.xmlBlaster.protocol.http.BlasterHttpProxy

public class BlasterHttpProxy
extends java.lang.Object

Contains some useful, static helper methods. It is a singleton.

It holds a hashtable with all current browser-xmlBlaster connections.

You can also use this class to handle shared attributes for all servlets.

Author:
Konrad Krafft, Marcel Ruff

Field Summary
private static java.util.Hashtable attributes
          Stores global Attributes for other Servlets
private static java.util.Hashtable httpPushHandlers
          Mapping the sessionId to a HttpPushHandler instance.
private static java.lang.String ME
           
 
Constructor Summary
BlasterHttpProxy()
           
 
Method Summary
static void addHttpPushHandler(java.lang.String sessionId, HttpPushHandler httpPushHandler)
          Gives a proxy connection by a given sessionId.
static void cleanup(java.lang.String sessionId)
          Cleanup Hashtable etc.
static java.lang.Object getAttribute(java.lang.String name)
          returns a Object by a given name
static HttpPushHandler getHttpPushHandler(java.lang.String sessionId)
          Gives a proxy connection by a given sessionId.
static I_XmlBlasterAccess getXmlBlasterAccess(java.lang.String sessionId)
           
static void removeAttribute(java.lang.String name)
          Remove the attribute.
static void setAttribute(java.lang.String name, java.lang.Object obj)
          writes a Object by a given name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

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

httpPushHandlers

private static java.util.Hashtable httpPushHandlers
Mapping the sessionId to a HttpPushHandler instance.

This HttpPushHandlers knows how to access xmlBlaster (with CORBA/SOCKET etc) and the Browser (with http).


attributes

private static java.util.Hashtable attributes
Stores global Attributes for other Servlets

Constructor Detail

BlasterHttpProxy

public BlasterHttpProxy()
Method Detail

getAttribute

public static java.lang.Object getAttribute(java.lang.String name)
returns a Object by a given name

Parameters:
name - key name
Returns:
Object

setAttribute

public static void setAttribute(java.lang.String name,
                                java.lang.Object obj)
writes a Object by a given name

Parameters:
name - key name
obj - Object

removeAttribute

public static void removeAttribute(java.lang.String name)
Remove the attribute.

Parameters:
name - key name

getXmlBlasterAccess

public static I_XmlBlasterAccess getXmlBlasterAccess(java.lang.String sessionId)
                                              throws XmlBlasterException
Throws:
XmlBlasterException

addHttpPushHandler

public static void addHttpPushHandler(java.lang.String sessionId,
                                      HttpPushHandler httpPushHandler)
                               throws XmlBlasterException
Gives a proxy connection by a given sessionId.

Parameters:
sessionId - HTTP sessionId
Throws:
If - sessionId not found.
XmlBlasterException

getHttpPushHandler

public static HttpPushHandler getHttpPushHandler(java.lang.String sessionId)
                                          throws XmlBlasterException
Gives a proxy connection by a given sessionId.

Parameters:
sessionId - HTTP sessionId
Returns:
valid httpPushHandler for valid HTTP sessionId (never null)
Throws:
If - sessionId not found.
XmlBlasterException

cleanup

public static void cleanup(java.lang.String sessionId)
Cleanup Hashtable etc.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.