Class AbstractInputStreamLookup
java.lang.Object
com.comphenix.protocol.injector.server.AbstractInputStreamLookup
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInputStreamLookup(ErrorReporter reporter, org.bukkit.Server server) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidInvoked when the injection should be undone.abstract voidInject the given server thread or dedicated connection.protected voidonPreviousSocketOverwritten(SocketInjector previous, SocketInjector current)If a player can hold a reference to its parent injector, this method will update that reference.abstract SocketInjectorpeekSocketInjector(SocketAddress address)Attempt to get a socket injector without blocking the thread.abstract voidsetSocketInjector(SocketAddress address, SocketInjector injector)Associate a given socket address to the provided socket injector.abstract SocketInjectorwaitSocketInjector(InputStream input)Retrieve the associated socket injector for a player.abstract SocketInjectorwaitSocketInjector(Socket socket)Retrieve an injector by its socket.abstract SocketInjectorwaitSocketInjector(SocketAddress address)Retrieve a injector by its address.
-
Field Details
-
reporter
-
server
protected final org.bukkit.Server server
-
-
Constructor Details
-
AbstractInputStreamLookup
-
-
Method Details
-
inject
Inject the given server thread or dedicated connection.- Parameters:
container- - class that contains a ServerSocket field.
-
waitSocketInjector
Retrieve the associated socket injector for a player.- Parameters:
input- - the indentifying filtered input stream.- Returns:
- The socket injector we have associated with this player.
-
waitSocketInjector
Retrieve an injector by its socket.- Parameters:
socket- - the socket.- Returns:
- The socket injector.
-
waitSocketInjector
Retrieve a injector by its address.- Parameters:
address- - the address of the socket.- Returns:
- The socket injector, or NULL if not found.
-
peekSocketInjector
Attempt to get a socket injector without blocking the thread.- Parameters:
address- - the address to lookup.- Returns:
- The socket injector, or NULL if not found.
-
setSocketInjector
Associate a given socket address to the provided socket injector.- Parameters:
address- - the socket address to associate.injector- - the injector.
-
onPreviousSocketOverwritten
If a player can hold a reference to its parent injector, this method will update that reference.- Parameters:
previous- - the previous injector.current- - the new injector.
-
cleanupAll
public abstract void cleanupAll()Invoked when the injection should be undone.
-