public abstract class ProtocolRegistry extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ProtocolRegistry.Register
Represents a register we are currently building.
|
| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
enumProtocol |
protected ProtocolRegistry.Register |
register |
| Constructor and Description |
|---|
ProtocolRegistry() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
associatePackets(ProtocolRegistry.Register register,
Map<Integer,Class<?>> lookup,
PacketType.Protocol protocol,
PacketType.Sender sender) |
Set<PacketType> |
getClientPackets()
Retrieve every known client packet, from every protocol.
|
Map<Class<?>,PacketType> |
getPacketClassLookup()
Retrieve an immutable view of the class to packet type lookup.
|
Map<PacketType,Class<?>> |
getPacketTypeLookup()
Retrieve an immutable view of the packet type lookup.
|
Set<PacketType> |
getServerPackets()
Retrieve every known server packet, from every protocol.
|
protected abstract void |
initialize()
Load the packet lookup tables in each protocol.
|
protected int |
sum(Iterable<? extends Map<Integer,Class<?>>> maps)
Retrieve the number of mapping in all the maps.
|
void |
synchronize()
Ensure that our local register is up-to-date with Minecraft.
|
protected Class<?> enumProtocol
protected volatile ProtocolRegistry.Register register
public Map<PacketType,Class<?>> getPacketTypeLookup()
public Map<Class<?>,PacketType> getPacketClassLookup()
public Set<PacketType> getClientPackets()
public Set<PacketType> getServerPackets()
public void synchronize()
This operation may block the calling thread.
protected abstract void initialize()
protected abstract void associatePackets(ProtocolRegistry.Register register, Map<Integer,Class<?>> lookup, PacketType.Protocol protocol, PacketType.Sender sender)
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.