Package net.ME1312.SubData.Server
Class DataServer
java.lang.Object
net.ME1312.SubData.Server.DataServer
SubData Server API Class
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Drops all connections and close the SubData Listenerabstract DataClient
Grabs a Client from the Networkabstract Map<UUID,
? extends DataClient> Grabs all the Clients on the Networkabstract DataProtocol
Get the Protocol for this Serverabstract boolean
isClosed()
Get if the listener has been closedabstract void
removeClient
(UUID id) Remove a Client from the Networkabstract void
removeClient
(DataClient client) Remove a Client from the Networkvoid
unwhitelist
(String address) Revoke Access from an Address (Per-Server)void
waitFor()
Wait for the listener to closevoid
Allow Access from an Address (Per-Server)
-
Field Details
-
on
-
-
Constructor Details
-
DataServer
public DataServer()
-
-
Method Details
-
getProtocol
Get the Protocol for this Server- Returns:
- Server Protocol
-
getClient
Grabs a Client from the Network- Parameters:
id
- Client ID- Returns:
- Client
-
getClients
Grabs all the Clients on the Network- Returns:
- Client Map
-
removeClient
Remove a Client from the Network- Parameters:
client
- Client to Kick- Throws:
IOException
-
removeClient
Remove a Client from the Network- Parameters:
id
- Client ID- Throws:
IOException
-
whitelist
Allow Access from an Address (Per-Server)- Parameters:
address
- Address to allow
-
unwhitelist
Revoke Access from an Address (Per-Server)- Parameters:
address
- Address to deny
-
close
Drops all connections and close the SubData Listener- Throws:
IOException
-
waitFor
Wait for the listener to close- Throws:
InterruptedException
-
isClosed
public abstract boolean isClosed()Get if the listener has been closed- Returns:
- Closed Status
-