|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClientletContext
The context in which a clientlet processes a web or file response.
ClientletAccess.getCurrentClientletContext()| Method Summary | |
|---|---|
void |
alert(java.lang.String message)
Opens an alert message dialog. |
ContentBuffer |
createContentBuffer(java.lang.String contentType,
byte[] content)
Undocumented. |
ContentBuffer |
createContentBuffer(java.lang.String contentType,
java.lang.String content,
java.lang.String encoding)
Undocumented. |
NavigatorFrame |
createNavigatorFrame()
Creates a lose navigator frame that may be added to GUI components. |
NetworkRequest |
createNetworkRequest()
Creates a NetworkRequest object that can be used
to load data over HTTP and other network protocols. |
java.lang.Object |
getItem(java.lang.String name)
Gets a data item. |
ManagedStore |
getManagedStore()
Gets a managed store instance (a small file system restricted by a quota) corresponding to the host of the clientlet response of this context. |
ManagedStore |
getManagedStore(java.lang.String hostName)
Gets a managed store instance (a small file system restricted by a quota) for the host name provided. |
NavigatorFrame |
getNavigatorFrame()
Gets the frame interface associated with this context. |
java.util.Properties |
getOverriddingWindowProperties()
Gets window properties previously set with overrideWindowProperties(java.util.Properties). |
NavigatorProgressEvent |
getProgressEvent()
Gets the progress event most recently set. |
ClientletRequest |
getRequest()
Gets the clientlet request. |
ClientletResponse |
getResponse()
Gets the clientlet response. |
ComponentContent |
getResultingContent()
Gets content previously set with setResultingContent(Component). |
UserAgent |
getUserAgent()
Gets a UserAgent instance with information about the current user agent. |
boolean |
isResultingContentSet()
Returns true if resulting content has already been set
with setResultingContent(ComponentContent). |
void |
navigate(java.lang.String uri)
Navigates to the URI provided, which may be absolute or relative to the response URL. |
void |
overrideWindowProperties(java.util.Properties properties)
For documents requested in order to open a new window, this method may be invoked to override window properties. |
void |
setItem(java.lang.String name,
java.lang.Object value)
Sets a data item for later retrieval. |
void |
setProgressEvent(NavigatorProgressEvent event)
Sets the current progress state. |
void |
setProgressEvent(ProgressType progressType,
int value,
int max)
Requests the frame to update its progress bar if any. |
void |
setProgressEvent(ProgressType progressType,
int value,
int max,
java.net.URL url)
Requests the frame to update its progress bar if any. |
void |
setResultingContent(java.awt.Component content)
A simple alternative to setResultingContent(ComponentContent)
provided for convenience. |
void |
setResultingContent(ComponentContent content)
After processing a response a clientlet should invoke this method to set displayable frame content. |
| Method Detail |
|---|
void setItem(java.lang.String name,
java.lang.Object value)
name - The item name.value - The item value.java.lang.Object getItem(java.lang.String name)
name - The item name.
ClientletRequest getRequest()
ClientletResponse getResponse()
UserAgent getUserAgent()
ContentBuffer createContentBuffer(java.lang.String contentType,
byte[] content)
ContentBuffer createContentBuffer(java.lang.String contentType,
java.lang.String content,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
ManagedStore getManagedStore()
throws java.io.IOException
java.io.IOExceptiongetManagedStore(String)
ManagedStore getManagedStore(java.lang.String hostName)
throws java.io.IOException
hostName - A host whose cookies the caller is allowed to access.
For example, if the response host name is
test.acme.com, then the hostName
parameter can be acme.com but not
com.
java.security.SecurityException - If the caller doesn't have
access to the managed store for the host given.
java.io.IOExceptionNavigatorFrame getNavigatorFrame()
void setResultingContent(ComponentContent content)
void setResultingContent(java.awt.Component content)
setResultingContent(ComponentContent)
provided for convenience.
It does not set any properties such as title or source code.
ComponentContent getResultingContent()
setResultingContent(Component).
The return value may be null.
void navigate(java.lang.String uri)
throws java.net.MalformedURLException
uri - The target URI.
java.net.MalformedURLExceptionNavigatorFrame.navigate(String)void overrideWindowProperties(java.util.Properties properties)
properties - A properties object following JavaScript
Window.open() conventions.java.util.Properties getOverriddingWindowProperties()
overrideWindowProperties(java.util.Properties).
boolean isResultingContentSet()
true if resulting content has already been set
with setResultingContent(ComponentContent).
void setProgressEvent(ProgressType progressType,
int value,
int max)
progressType - The type of progress action.value - The current progress value.max - The maximum progress value, which may be -1 to indicate it is unknown.NavigatorFrame.setProgressEvent(NavigatorProgressEvent)
void setProgressEvent(ProgressType progressType,
int value,
int max,
java.net.URL url)
progressType - The type of progress action.value - The current progress value.max - The maximum progress value, which may be -1 to indicate it is unknown.url - The URL to be shown in progress messages.NavigatorFrame.setProgressEvent(NavigatorProgressEvent)void setProgressEvent(NavigatorProgressEvent event)
event - The progress event.NavigatorFrame.setProgressEvent(NavigatorProgressEvent),
getProgressEvent()NavigatorProgressEvent getProgressEvent()
setProgressEvent(ProgressType, int, int),
NavigatorFrame.setProgressEvent(NavigatorProgressEvent)NetworkRequest createNetworkRequest()
NetworkRequest object that can be used
to load data over HTTP and other network protocols.
void alert(java.lang.String message)
message - An alert message.NavigatorFrame createNavigatorFrame()
NavigatorFrame.getComponent(),
NavigatorFrame.navigate(String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||