public class FileSystemServer extends Object
| Constructor and Description |
|---|
FileSystemServer(String name,
int port,
String contextPath,
FileSystem fileSystem,
String settingsServletPath,
boolean debugServer)
Creates a new file system server that will serve a
FileSystem over HTTP on the specified port. |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureStarted()
Ensures that the file system server is started (if already starting, will block until started, otherwise starts
the file system server and blocks until started)
|
void |
finish()
Signal the file system server to shut down.
|
int |
getPort()
Gets the port that the file system server is/will server on.
|
String |
getRemoteUrl()
Same as
getUrl(), but now for remote users |
String |
getUrl()
Gets the root url that the file system server is/will server on.
|
boolean |
isFinished()
Returns
true if and only if the file system server is finished. |
boolean |
isStarted()
Returns
true if and only if the file system server is started. |
void |
waitForFinished()
Blocks until the file system server has actually shut down.
|
public FileSystemServer(String name, int port, String contextPath, FileSystem fileSystem, String settingsServletPath, boolean debugServer)
FileSystem over HTTP on the specified port.name - The name of the file system server thread.port - The port to server on or 0 to pick a random, but available, port.fileSystem - the file system to serve.debugServer - the server debug modepublic void ensureStarted()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if the file system server could not be started.public boolean isFinished()
true if and only if the file system server is finished.true if and only if the file system server is finished.public boolean isStarted()
true if and only if the file system server is started.true if and only if the file system server is started.public void finish()
public void waitForFinished()
throws InterruptedException
InterruptedException - if interrupted.public int getPort()
public String getUrl()
public String getRemoteUrl() throws UnknownHostException
getUrl(), but now for remote usersUnknownHostException - if the local host name could not be resolved into an address.Copyright © 2009–2022 MojoHaus. All rights reserved.