Package org.xwiki.export.pdf.browser
Interface BrowserManager
-
- All Superinterfaces:
AutoCloseable
@Role @Unstable public interface BrowserManager extends AutoCloseable
Manages the web browser used for printing to PDF.- Since:
- 14.8
- Version:
- $Id: 6310347148938b95400f915afbf27da6b2ccb83b $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()voidconnect(String host, int port)Attempts to connect to the web browser that runs on the specified host, behind the specified port.BrowserTabcreateIncognitoTab()Opens a new web browser tab that uses a separate browser context (profile).booleanisConnected()
-
-
-
Method Detail
-
connect
void connect(String host, int port) throws TimeoutException
Attempts to connect to the web browser that runs on the specified host, behind the specified port.- Parameters:
host- the host running the web browser, specified either as an IP address or a host nameport- the port number to connect to- Throws:
TimeoutException- if the connection timeouts
-
isConnected
boolean isConnected()
- Returns:
trueif the web browser can be accessed,falseotherwise
-
createIncognitoTab
BrowserTab createIncognitoTab() throws IOException
Opens a new web browser tab that uses a separate browser context (profile).- Returns:
- the create tab
- Throws:
IOException
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
-