Package net.sourceforge.jnlp.services
Class XBasicService
- java.lang.Object
-
- net.sourceforge.jnlp.services.XBasicService
-
- All Implemented Interfaces:
BasicService
class XBasicService extends java.lang.Object implements BasicService
The BasicService JNLP service.- Version:
- $Revision: 1.10 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classXBasicService.PromptUrl
-
Constructor Summary
Constructors Constructor Description XBasicService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanexec(java.lang.String cmd, java.lang.String url)private java.net.URLfindFirstURLFromJNLPFile()Return the first URL from the jnlp file Or a default URL if no url found in JNLP filejava.net.URLgetCodeBase()Returns the codebase of the application, applet, or installer.booleanisOffline()Return true if the Environment is OfflinebooleanisWebBrowserSupported()Return true if a Web Browser is Supportedprivate java.lang.StringpromptForCommand(java.lang.String targetUrl, boolean aa)booleanshowDocument(java.net.URL url)Show a document.
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
-
Method Detail
-
getCodeBase
public java.net.URL getCodeBase()
Returns the codebase of the application, applet, or installer. If the codebase was not specified in the JNLP element then the main JAR's location is returned. If no main JAR was specified then the location of the JAR containing the main class is returned.- Specified by:
getCodeBasein interfaceBasicService
-
isOffline
public boolean isOffline()
Return true if the Environment is Offline- Specified by:
isOfflinein interfaceBasicService
-
findFirstURLFromJNLPFile
private java.net.URL findFirstURLFromJNLPFile()
Return the first URL from the jnlp file Or a default URL if no url found in JNLP file
-
isWebBrowserSupported
public boolean isWebBrowserSupported()
Return true if a Web Browser is Supported- Specified by:
isWebBrowserSupportedin interfaceBasicService
-
showDocument
public boolean showDocument(java.net.URL url)
Show a document.- Specified by:
showDocumentin interfaceBasicService- Returns:
- whether the document was opened
-
exec
private boolean exec(java.lang.String cmd, java.lang.String url)
-
promptForCommand
private java.lang.String promptForCommand(java.lang.String targetUrl, boolean aa) throws java.io.IOException- Throws:
java.io.IOException
-
-