-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
natt/src/main/java/utb/fai/natt/core/ServerHostUtility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package utb.fai.natt.core; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* This is simple terminal utility class for hosting a simple server for | ||
* purpose of interactive testing. This utility use servers defined in module | ||
* package. | ||
*/ | ||
public class ServerHostUtility { | ||
|
||
public ServerHostUtility() { | ||
|
||
} | ||
|
||
/** | ||
* Host a server for interactive testing. | ||
* | ||
* @param option Option of server to host | ||
*/ | ||
public void hostServer(String option) { | ||
|
||
} | ||
|
||
/** | ||
* Get the list of available servers that can be hosted. | ||
* | ||
* @return List of options | ||
*/ | ||
public List<String> getHostOptions() { | ||
List<String> opts = new ArrayList<String>(); | ||
opts.add("email-server"); | ||
opts.add("mqtt-broker"); | ||
opts.add("telnet-server"); | ||
opts.add("telnet-server-echo"); | ||
opts.add("telnet-server-broadcast"); | ||
opts.add("http-server"); | ||
return opts; | ||
} | ||
|
||
/** | ||
* Terminate the server. | ||
*/ | ||
public void terminateServer() { | ||
} | ||
|
||
} |