public abstract class AbstractInputStreamLookup extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ErrorReporter |
reporter |
protected org.bukkit.Server |
server |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractInputStreamLookup(ErrorReporter reporter,
org.bukkit.Server server) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
cleanupAll()
Invoked when the injection should be undone.
|
abstract void |
inject(Object container)
Inject the given server thread or dedicated connection.
|
protected void |
onPreviousSocketOverwritten(SocketInjector previous,
SocketInjector current)
If a player can hold a reference to its parent injector, this method will update that reference.
|
abstract SocketInjector |
peekSocketInjector(SocketAddress address)
Attempt to get a socket injector without blocking the thread.
|
abstract void |
setSocketInjector(SocketAddress address,
SocketInjector injector)
Associate a given socket address to the provided socket injector.
|
abstract SocketInjector |
waitSocketInjector(InputStream input)
Retrieve the associated socket injector for a player.
|
abstract SocketInjector |
waitSocketInjector(Socket socket)
Retrieve an injector by its socket.
|
abstract SocketInjector |
waitSocketInjector(SocketAddress address)
Retrieve a injector by its address.
|
protected final ErrorReporter reporter
protected final org.bukkit.Server server
protected AbstractInputStreamLookup(ErrorReporter reporter, org.bukkit.Server server)
public abstract void inject(Object container)
container - - class that contains a ServerSocket field.public abstract SocketInjector waitSocketInjector(InputStream input)
input - - the indentifying filtered input stream.public abstract SocketInjector waitSocketInjector(Socket socket)
socket - - the socket.public abstract SocketInjector waitSocketInjector(SocketAddress address)
address - - the address of the socket.public abstract SocketInjector peekSocketInjector(SocketAddress address)
address - - the address to lookup.public abstract void setSocketInjector(SocketAddress address, SocketInjector injector)
address - - the socket address to associate.injector - - the injector.protected void onPreviousSocketOverwritten(SocketInjector previous, SocketInjector current)
previous - - the previous injector.current - - the new injector.public abstract void cleanupAll()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.