Interface NetworkRegistry
- All Known Implementing Classes:
StargateNetworkRegistry
public interface NetworkRegistry
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all stored networksvoid
Close all portals of the networks contained in this registry@Nullable Network
getFromName
(String name) @Nullable Network
getNetwork
(String name) Gets the network with the giveniterator()
boolean
networkExists
(String id) Checks whether the given network name existsboolean
networkNameExists
(String name) void
registerNetwork
(Network network) UseNetworkManager
instead.void
renameNetwork
(String newId, String oldId) UseNetworkManager
instead.int
size()
stream()
void
unregisterNetwork
(Network network) UseNetworkManager
instead.void
Update all portals stored in the network
-
Method Details
-
registerNetwork
UseNetworkManager
instead. This does not save to database, and is not cross server compatible- Parameters:
network
-
-
renameNetwork
@Internal void renameNetwork(String newId, String oldId) throws InvalidNameException, UnimplementedFlagException, NameLengthException UseNetworkManager
instead. This does not save to database, and is not cross server compatible- Parameters:
newId
-oldId
-- Throws:
InvalidNameException
UnimplementedFlagException
NameLengthException
-
unregisterNetwork
UseNetworkManager
instead. This does not save to database, and is not cross server compatible- Parameters:
network
-
-
getNetwork
Gets the network with the given- Parameters:
name
-The name of the network to get
- Returns:
The network with the given name
-
networkExists
Checks whether the given network name exists- Parameters:
id
-The network name to check
- Returns:
True if the network exists
-
clear
void clear()Clear all stored networks -
updatePortals
void updatePortals()Update all portals stored in the network -
stream
- Returns:
A stream of all networks
-
iterator
- Returns:
An iterator of all networks
-
networkNameExists
- Parameters:
name
-The name of the network
- Returns:
Whether any network has that name
-
getFromName
- Parameters:
name
-The name of the network
- Returns:
The network of that name
-
closeAllPortals
void closeAllPortals()Close all portals of the networks contained in this registry -
size
int size()- Returns:
The amount of networks stored in this registry
-