Class PlayerDirectory
java.lang.Object
io.github.protasm.jvmud.communication.transport.telnet.PlayerDirectory
- All Implemented Interfaces:
AutoCloseable
Public directory of running mudlibs; visitors browse details without entering a mudlib.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPublic connection details, without worker access or administration authority. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerDirectory(String address, int port, Supplier<List<PlayerDirectory.Entry>> available) Reserves a player port without accepting sessions until start is called. -
Method Summary
-
Constructor Details
-
PlayerDirectory
public PlayerDirectory(String address, int port, Supplier<List<PlayerDirectory.Entry>> available) throws IOException Reserves a player port without accepting sessions until start is called.- Throws:
IOException
-
-
Method Details
-
start
public void start()Opens player admission after all endpoints in the pair have been bound successfully. -
port
public int port()Actual bound player port, including ephemeral allocations. -
close
public void close()Closes the listener and any visitors still receiving the directory.- Specified by:
closein interfaceAutoCloseable
-