|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttachmentHandler
A handler for attachments, which represent pages received from the server which contain
Content-Disposition=attachment
headers. Normally pages are loaded inline: clicking on
a link, for example, loads the linked page in the current window. Attached pages are different
in that they are intended to be loaded outside of this flow: clicking on a link prompts the
user to either save the linked page, or open it outside of the current window, but does not
load the page in the current window.
HtmlUnit complies with the semantics described above when an AttachmentHandler has
been registered with the WebClient
via
WebClient.setAttachmentHandler(AttachmentHandler)
. When
no attachment handler has been registered with the WebClient, the semantics described
above to not apply, and attachments are loaded inline. By default, AttachmentHandlers
are not registered with new WebClient instances, in order to maintain backwards
compatibility with HtmlUnit 2.1 and earlier. This will likely change in the future.
WebClient.setAttachmentHandler(AttachmentHandler)
,
WebClient.getAttachmentHandler()
,
RFC 2183Method Summary | |
---|---|
void |
handleAttachment(Page page)
Handles the specified attached page. |
Method Detail |
---|
void handleAttachment(Page page)
page
- an attached page, which doesn't get loaded inline
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |