@ParametersAreNonnullByDefault public abstract class RakNet extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected AtomicBoolean |
closed |
protected Map<String,Consumer<Throwable>> |
exceptionHandlers |
protected long |
guid |
protected RakMetrics |
metrics |
protected int |
protocolVersion |
| Modifier and Type | Method and Description |
|---|---|
void |
addExceptionHandler(String handlerId,
Consumer<Throwable> handler) |
CompletableFuture<Void> |
bind() |
protected abstract CompletableFuture<Void> |
bindInternal() |
void |
clearExceptionHandlers() |
void |
close() |
void |
close(boolean force) |
abstract InetSocketAddress |
getBindAddress() |
io.netty.bootstrap.Bootstrap |
getBootstrap() |
protected io.netty.channel.EventLoopGroup |
getEventLoopGroup() |
Collection<Consumer<Throwable>> |
getExceptionHandlers() |
long |
getGuid() |
RakMetrics |
getMetrics() |
int |
getProtocolVersion() |
boolean |
isClosed() |
boolean |
isRunning() |
protected io.netty.channel.EventLoop |
nextEventLoop() |
protected abstract void |
onTick() |
void |
removeExceptionHandler(String handlerId) |
void |
setMetrics(RakMetrics metrics) |
void |
setProtocolVersion(int protocolVersion) |
protected final long guid
protected int protocolVersion
protected final AtomicBoolean closed
protected final io.netty.bootstrap.Bootstrap bootstrap
protected RakMetrics metrics
public CompletableFuture<Void> bind()
public void close()
close in interface AutoCloseablepublic void close(boolean force)
protected abstract CompletableFuture<Void> bindInternal()
protected abstract void onTick()
public boolean isRunning()
public boolean isClosed()
public io.netty.bootstrap.Bootstrap getBootstrap()
@Nonnegative public int getProtocolVersion()
public void setProtocolVersion(@Nonnegative int protocolVersion)
public abstract InetSocketAddress getBindAddress()
public long getGuid()
protected io.netty.channel.EventLoopGroup getEventLoopGroup()
protected io.netty.channel.EventLoop nextEventLoop()
public void setMetrics(RakMetrics metrics)
public RakMetrics getMetrics()
public void removeExceptionHandler(String handlerId)
public void clearExceptionHandlers()
public Collection<Consumer<Throwable>> getExceptionHandlers()
Copyright © 2018–2022. All rights reserved.