|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.webrenderer.event.NetworkEvent
An event which indicates that there has been network activity. Currently, a
NetworkEvent will be invoked if:
To reduce the cost of multiple method invocations, the event object will record the new data pertaining to the event. The object will only contain the data required for the given event. This implies that if the event was generated due to a progress change, then the other information will be invalid.
| Field Summary | |
static int |
FAILED_CONNECT
Flag indicating that connection has failed. |
static int |
FAILED_DNS
Flag indicating that DNS resolution has failed. |
static int |
FAILED_TIMEOUT
Flag indicating that the connection timed out. |
static int |
FAILED_USER_CANCEL
Flag indicating that the user cancelled the connection. |
static int |
STATUS_NEGOTIATING
Flag indicating the browser is awaiting authorisation. |
static int |
STATUS_REDIRECTING
Flag indicating the browser is being redirected. |
static int |
STATUS_TRANSFERRING
Flag indicating that browser is transferring data from server. |
| Constructor Summary | |
NetworkEvent(java.lang.Object source)
Constructor for NetworkEvent with a source. |
|
NetworkEvent(java.lang.Object source,
MutableRequestHeaders mrh)
|
|
| Method Summary | |
java.security.cert.X509Certificate |
getCertificate()
Gets the X.509 Certificate. |
int |
getCurrentProgress()
Returns the number of bytes currently downloaded. |
int |
getFailure()
Gets the failure status of the network error. |
java.lang.String |
getFrame()
Returns the strFrame. |
java.lang.String |
getHeaders()
Deprecated. instead use getRequestHeaders() or getResponseHeaders() |
int |
getMaximumProgress()
Returns the maximum number of bytes to download. |
MutableRequestHeaders |
getMutableRequestHeaders()
Returns a MutableRequestHeaders object that allows modification of the request headers for the current transaction. |
java.lang.String |
getRequestHeaders()
Returns the requestHeaders. |
java.lang.String |
getResponseHeaders()
Returns the responseHeaders. |
int |
getStatus()
Gets the network status. |
java.lang.String |
getStatusText()
Gets the status text |
int |
getTransactionId()
Used to link a BrowserEvent.onBeforeNavigate to a NetowrkEvent.onHTTPResponse |
java.lang.String |
getURL()
Returns the strURL. |
void |
setCertificate(java.security.cert.X509Certificate cert)
Sets the X.509 Certificate. |
void |
setFailure(int flags)
Sets the failure status of the network error. |
void |
setFrame(java.lang.String strFrame)
Sets the strFrame. |
void |
setHeaders(java.lang.String string)
|
void |
setProgress(int current,
int maximum)
Sets the current and maximum number of bytes that will be downloaded for the resource. |
void |
setRequestHeaders(java.lang.String requestHeaders)
Sets the requestHeaders. |
void |
setResponseHeaders(java.lang.String responseHeaders)
Sets the responseHeaders. |
void |
setStatus(int flags)
Sets the network status. |
void |
setStatusText(java.lang.String string)
|
void |
setTransactionId(int i)
|
void |
setURL(java.lang.String strURL)
Sets the strURL. |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int FAILED_DNS
public static final int FAILED_CONNECT
public static final int FAILED_TIMEOUT
public static final int FAILED_USER_CANCEL
public static final int STATUS_REDIRECTING
public static final int STATUS_TRANSFERRING
public static final int STATUS_NEGOTIATING
| Constructor Detail |
public NetworkEvent(java.lang.Object source)
EventObject.EventObject(Object)
public NetworkEvent(java.lang.Object source,
MutableRequestHeaders mrh)
| Method Detail |
public MutableRequestHeaders getMutableRequestHeaders()
public int getCurrentProgress()
public int getMaximumProgress()
public void setProgress(int current,
int maximum)
current - The current number of bytes downloaded.maximum - The maximum number of bytes to download.public void setFailure(int flags)
flags - Failure status defined using FAILED_*public int getFailure()
FAILED_*public void setStatus(int flags)
flags - Network status defined using STATUS_*public int getStatus()
STATUS_*public java.lang.String getHeaders()
public java.lang.String getStatusText()
public void setHeaders(java.lang.String string)
string - public void setStatusText(java.lang.String string)
string - public java.lang.String getFrame()
public java.lang.String getURL()
public void setFrame(java.lang.String strFrame)
strFrame - The strFrame to setpublic void setURL(java.lang.String strURL)
strURL - The strURL to setpublic int getTransactionId()
public void setTransactionId(int i)
i - public java.lang.String getRequestHeaders()
public java.lang.String getResponseHeaders()
public void setRequestHeaders(java.lang.String requestHeaders)
requestHeaders - The requestHeaders to setpublic void setResponseHeaders(java.lang.String responseHeaders)
responseHeaders - The responseHeaders to setpublic java.security.cert.X509Certificate getCertificate()
public void setCertificate(java.security.cert.X509Certificate cert)
cert - the X509Certificate to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||