com.teamdev.jxbrowser.event
Class RequestAdapter

java.lang.Object
  extended by com.teamdev.jxbrowser.event.RequestAdapter
All Implemented Interfaces:
RequestListener, java.util.EventListener

public abstract class RequestAdapter
extends java.lang.Object
implements RequestListener

Convenience class for implementing progress listeners.

See Also:
RequestListener, WebBrowser

Field Summary
 
Fields inherited from interface com.teamdev.jxbrowser.event.RequestListener
STATE_IS_BROKEN, STATE_IS_DOCUMENT, STATE_IS_INSECURE, STATE_IS_NETWORK, STATE_IS_REQUEST, STATE_IS_SECURE, STATE_IS_WINDOW, STATE_NEGOTIATING, STATE_REDIRECTING, STATE_RESTORING, STATE_SECURE_HIGH, STATE_SECURE_LOW, STATE_SECURE_MED, STATE_START, STATE_STOP, STATE_TRANSFERRING
 
Constructor Summary
RequestAdapter()
           
 
Method Summary
 void locationChanged(LocationEvent event)
          Invoked when the location of the window being watched changes.
 void progressChanged(ProgressEvent event)
          Invoked when the progress has changed for one of the requests.
 void securityChanged(SecurityEvent event)
          Invoked on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion.
 void stateChanged(StateEvent event)
          Notification indicating the state has changed for one of the requests.
 void statusChanged(StatusEvent event)
          Invoked when the status of a request has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestAdapter

public RequestAdapter()
Method Detail

stateChanged

public void stateChanged(StateEvent event)
Description copied from interface: RequestListener
Notification indicating the state has changed for one of the requests.

State Transition Flags: RequestListener.STATE_START, RequestListener.STATE_REDIRECTING, RequestListener.STATE_TRANSFERRING, RequestListener.STATE_NEGOTIATING, RequestListener.STATE_STOP.

These flags indicate the various states that requests may transition through as they are being loaded. These flags are mutually exclusive.

For any given request, RequestListener.stateChanged(StateEvent) is called once with the #STATE_START flag, zero or more times with the #STATE_TRANSFERRING flag or once with the #STATE_REDIRECTING flag, and then finally once with the #STATE_STOP flag. NOTE: For document requests, a second #STATE_STOP is generated (see the description of #STATE_IS_WINDOW for more details).

State Type Flags: #STATE_IS_REQUEST, #STATE_IS_DOCUMENT, #STATE_IS_NETWORK, #STATE_IS_WINDOW.

These flags further describe the entity for which the state transition is occuring. These flags are NOT mutually exclusive (i.e., an #stateChanged(StateEvent) event may indicate some combination of these flags).

State Modifier Flags: RequestListener.STATE_RESTORING.

These flags further describe the transition which is occuring. These flags are NOT mutually exclusive (i.e., an #stateChanged (StateEvent) event may indicate some combination of these flags).

Specified by:
stateChanged in interface RequestListener
Parameters:
event - event object

progressChanged

public void progressChanged(ProgressEvent event)
Description copied from interface: RequestListener
Invoked when the progress has changed for one of the requests.

Specified by:
progressChanged in interface RequestListener
Parameters:
event - event object

locationChanged

public void locationChanged(LocationEvent event)
Description copied from interface: RequestListener
Invoked when the location of the window being watched changes.

Specified by:
locationChanged in interface RequestListener
Parameters:
event - event object

statusChanged

public void statusChanged(StatusEvent event)
Description copied from interface: RequestListener
Invoked when the status of a request has changed.

Specified by:
statusChanged in interface RequestListener
Parameters:
event - event object

securityChanged

public void securityChanged(SecurityEvent event)
Description copied from interface: RequestListener
Invoked on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. It might also be called if an error occurs during network loading.

State Security Flags: RequestListener.STATE_IS_INSECURE, RequestListener.STATE_IS_BROKEN, RequestListener.STATE_IS_SECURE.

These flags describe the security state reported by a call to the onSecurityChange method. These flags are mutually exclusive.

Security Strength Flags: RequestListener.STATE_SECURE_HIGH, RequestListener.STATE_SECURE_MED, RequestListener.STATE_SECURE_LOW

These flags describe the security strength and accompany RequestListener.STATE_IS_SECURE in a call to the onSecurityChange method. These flags are mutually exclusive.

These flags are not meant to provide a precise description of data transfer security. These are instead intended as a rough indicator that may be used to, for example, color code a security indicator or otherwise provide basic data transfer security feedback to the user.

Specified by:
securityChanged in interface RequestListener
Parameters:
event - event object