com.tibco.bpm.web.client.model.pagebus.hub
Class ManagedHubFrame

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Frame
              extended by com.tibco.bpm.web.client.model.pagebus.hub.ManagedHubFrame
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasLoadHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsWidget

public class ManagedHubFrame
extends com.google.gwt.user.client.ui.Frame

An extension to Frame that enables the iframe widget to communicate with the containing application or other iframe elements using the TIBCO PageBus Managed Hub.

©2011 Cloud Software Group, Inc.

Since:
1.2.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ManagedHubFrame(java.lang.String clientId, java.lang.String iFrameUri, java.lang.String tunnelUri, ManagedHub managedHub)
          Creates a ManagedHubFrame with the given parameters.
ManagedHubFrame(java.lang.String clientId, java.lang.String iFrameUri, java.lang.String tunnelUri, ManagedHub managedHub, java.lang.Integer timeout, OnConnectCallback onConnectCallback, OnDisconnectCallback onDisconnectCallback, OnSecurityAlertCallback onSecurityAlertCallback, OnLogCallback onLogCallback, OnSeedCallback onSeedCallback, java.lang.Integer tokenLength)
          Creates a ManagedHubFrame with the given parameters.
 
Method Summary
 java.lang.String getOrigin()
          Returns the origin for the Iframe URI.
 java.lang.String getSecurityAlertMessage(java.lang.String alertType)
           
protected  void onLoad()
           
 void removeIframeContainerFromHub()
           
 
Methods inherited from class com.google.gwt.user.client.ui.Frame
addLoadHandler, getUrl, setUrl, setUrl, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

ManagedHubFrame

public ManagedHubFrame(java.lang.String clientId,
                       java.lang.String iFrameUri,
                       java.lang.String tunnelUri,
                       ManagedHub managedHub)
Creates a ManagedHubFrame with the given parameters. The given ManagedHub instance is used.

Defaults values are used for optional parameters.

All IframeContainer callbacks will be handled by the ManagedHubFrame default callbacks. Initialize instance with provided ManagedHub instance.

Parameters:
clientId - The id value to use for the Hub Container.
iFrameUri - The URI to be loaded into the Iframe.
tunnelUri - URI of the tunnel.html file. Must be from the same origin as the page which instantiates the ManagedHubFrame.
managedHub - The ManagedHub instance to which this Container belongs.

ManagedHubFrame

public ManagedHubFrame(java.lang.String clientId,
                       java.lang.String iFrameUri,
                       java.lang.String tunnelUri,
                       ManagedHub managedHub,
                       java.lang.Integer timeout,
                       OnConnectCallback onConnectCallback,
                       OnDisconnectCallback onDisconnectCallback,
                       OnSecurityAlertCallback onSecurityAlertCallback,
                       OnLogCallback onLogCallback,
                       OnSeedCallback onSeedCallback,
                       java.lang.Integer tokenLength)
Creates a ManagedHubFrame with the given parameters.

The first three params are required: clientId, iFrameUri, tunnelUri. All other params may be null. If null a default value is used. For an IframeContainer callback that is null a default noop callback is used except for the onSecurityAlertCallback. If null is passed for the onSecurityAlertCallback param the default onSecurityAlert callback will do the following:

Parameters:
clientId - Identifies a particular client of a Managed Hub. Unique within the context of the ManagedHub.
iFrameUri - Initial Iframe URI (Container will add parameters to this URI)
tunnelUri - URI of the tunnel iframe. Must be from the same origin as the page which instantiates the IframeContainer.
managedHub - The ManagedHub instance to which this Container belongs.
timeout - Load timeout in milliseconds. If not specified, defaults to 15000. If the client at params.IframeContainer.uri does not establish a connection with this container in the given time, the onSecurityAlert callback is called with a LoadTimeout error code.
onConnectCallback - Called when the client connects to the Managed Hub.
onDisconnectCallback - Called when the client disconnects from the Managed Hub.
onSecurityAlertCallback - Invoked when a security alert is raised.
onLogCallback - Receives build-in logging from the PageBus.
onSeedCallback - Callback to seed pseudo-random number generator. An implementation of IframeContainer may choose to ignore this value.
tokenLength - Length of the security tokens used when transmitting messages. If not specified, defaults to 6. An implementation of IframeContainer may choose to ignore this value.
Method Detail

getSecurityAlertMessage

public java.lang.String getSecurityAlertMessage(java.lang.String alertType)

getOrigin

public java.lang.String getOrigin()
Returns the origin for the Iframe URI. This is in the form required by the HubPolicy class methods for the origin param.

The origin has the format

[protocol]://[host]

where:

[protocol] is "http" or "https"
[host] is the hostname of the given uri.

Returns:
The origin of the Iframe URI in the form required by the HubPolicy class methods.

onLoad

protected void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

removeIframeContainerFromHub

public void removeIframeContainerFromHub()


Copyright © 2015 Cloud Software Group, Inc. All Rights Reserved.