Package com.zebra.sdk.weblink
Class WeblinkConfigurator
Object
com.zebra.sdk.weblink.WeblinkConfigurator
Task to configure a printers Weblink setting
-
Constructor Summary
ConstructorsConstructorDescriptionWeblinkConfigurator(Connection connection) Initializes a new instance of the WeblinkConfiguratior class.WeblinkConfigurator(DiscoveredPrinter printer) Initializes a new instance of the WeblinkConfiguratior class. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(String webLinkAddress, WeblinkAddressStrategy strategy, WeblinkConfigurationStateUpdater webConfigStatusUpdater) Configures a printer to connect to a Zebra Weblink server and attempts to validate a successful connection.Returns the currentWeblinkConfigurationStateReturns theConfigurationStatusof the weblink configuration task.booleanisValidWeblinkUrl(String url) Returns true if the supplied weblinkurlis valid for the Zebra weblink server.
-
Constructor Details
-
WeblinkConfigurator
Initializes a new instance of the WeblinkConfiguratior class.- Parameters:
printer- TheDiscoveredPrinterto configure.
-
WeblinkConfigurator
Initializes a new instance of the WeblinkConfiguratior class.- Parameters:
connection- AConnectionto a printer
-
-
Method Details
-
configure
public void configure(String webLinkAddress, WeblinkAddressStrategy strategy, WeblinkConfigurationStateUpdater webConfigStatusUpdater) throws ZebraWeblinkException Configures a printer to connect to a Zebra Weblink server and attempts to validate a successful connection. Please note that this function will block while waiting for the printer to reset and while validating the connection. This could take an excess of 60 seconds.- Parameters:
webLinkAddress- Weblink address to setstrategy- Determines which weblink setting will be configuredwebConfigStatusUpdater- Callback object to report task status- Throws:
ZebraWeblinkException- Thrown when a configuration error occurs Configures the printers weblink according to the selected strategy. Also validates the weblink address is valid.
-
getCurrentState
Returns the currentWeblinkConfigurationState- Returns:
- The current configuration state
-
getStatus
Returns theConfigurationStatusof the weblink configuration task.- Returns:
- Returns the status of the current configuration task
-
isValidWeblinkUrl
Returns true if the supplied weblinkurlis valid for the Zebra weblink server.- Parameters:
url- Potential URL to a Zebra Weblink server- Returns:
- true if the URL is a properly formed URL for the Zebra Weblink server
-