A C D F G H I K L M N O P Q R S T U V W 
All Classes All Packages

A

automaticPacketProcessing() - Method in class com.germancoding.packetapi.PacketHandler
 
autoSendKeepAlive() - Method in class com.germancoding.packetapi.PacketHandler
 
available() - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 

C

close() - Method in class com.germancoding.packetapi.PacketHandler
Closes the connection, the I/O streams and notfies the other side that we are closing this connection.
close() - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
close() - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
close() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
Closes the underlying socket.
CLOSE_PACKET - Static variable in class com.germancoding.packetapi.defaultpackets.IDRegistry
 
ClosePacket - Class in com.germancoding.packetapi.defaultpackets
 
ClosePacket() - Constructor for class com.germancoding.packetapi.defaultpackets.ClosePacket
 
com.germancoding.packetapi - package com.germancoding.packetapi
 
com.germancoding.packetapi.defaultpackets - package com.germancoding.packetapi.defaultpackets
 
com.germancoding.packetapi.udp - package com.germancoding.packetapi.udp
 
connect(InetAddress, int) - Method in class com.germancoding.packetapi.udp.UnreliableSocket
"Connects" (Remember, UDP is a connection-less protocol) the socket to another socket.

D

DATA_TIMEOUT - Static variable in class com.germancoding.packetapi.PacketHandler
Timeout (in MS) after which KeepAlive packets should be send.
DataReader - Class in com.germancoding.packetapi
 
DataReader(PacketHandler) - Constructor for class com.germancoding.packetapi.DataReader
 
DataSender - Class in com.germancoding.packetapi
 
DataSender(PacketHandler) - Constructor for class com.germancoding.packetapi.DataSender
 
DefaultPacket - Interface in com.germancoding.packetapi.defaultpackets
Classes extending this interface are default packets.
DefaultPacketListener - Class in com.germancoding.packetapi
 
DefaultPacketListener(PacketHandler) - Constructor for class com.germancoding.packetapi.DefaultPacketListener
 

F

flush() - Method in class com.germancoding.packetapi.PacketWriter
 
flush() - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 

G

getCachedPackets() - Method in class com.germancoding.packetapi.PacketHandler
Returns all packets that have not been processed yet.
getCloseMessage() - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
getConnectionName() - Method in class com.germancoding.packetapi.PacketHandler
 
getDefaultPacketListener() - Method in class com.germancoding.packetapi.PacketHandler
 
getHandler() - Method in class com.germancoding.packetapi.Process
 
getHandshakeID() - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
getId() - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
getId() - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
getId() - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
getId() - Method in class com.germancoding.packetapi.Packet
 
getInputStream() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
getLastContactAddress() - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
getLastContactPort() - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
getLastPacketReceived() - Method in class com.germancoding.packetapi.PacketHandler
 
getLastPacketSend() - Method in class com.germancoding.packetapi.PacketHandler
 
getListener() - Method in class com.germancoding.packetapi.PacketHandler
 
getNewPacketInstance(short) - Method in class com.germancoding.packetapi.PacketHandler
 
getOutputStream() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
getOverridePort() - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
getOverrideSendAddress() - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
getPacket() - Method in class com.germancoding.packetapi.Process
 
getPacketID() - Method in class com.germancoding.packetapi.Process
 
getProtocolVersion() - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
getReader() - Method in class com.germancoding.packetapi.PacketHandler
 
getRemoteAddress() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
getRemotePort() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
getRemoteProtocolVersion() - Method in class com.germancoding.packetapi.PacketHandler
 
getSender() - Method in class com.germancoding.packetapi.PacketHandler
 
getSocket() - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
getType() - Method in class com.germancoding.packetapi.Process
 

H

handle(DataInputStream) - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
handle(DataInputStream) - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
handle(DataInputStream) - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
handle(DataInputStream) - Method in class com.germancoding.packetapi.Packet
Called by the DataReader when a packet with this id is read.
handler - Variable in class com.germancoding.packetapi.DataReader
 
handler - Variable in class com.germancoding.packetapi.DataSender
 
HANDSHAKE_ID_REQUEST - Static variable in class com.germancoding.packetapi.PacketHandler
Handshake ID used in the sendHandshake() method.
HANDSHAKE_ID_RESPONSE - Static variable in class com.germancoding.packetapi.PacketHandler
Handshake ID used when replying to a handshake packet.
HANDSHAKE_PACKET - Static variable in class com.germancoding.packetapi.defaultpackets.IDRegistry
 
HandshakePacket - Class in com.germancoding.packetapi.defaultpackets
 
HandshakePacket() - Constructor for class com.germancoding.packetapi.defaultpackets.HandshakePacket
 

I

IDRegistry - Class in com.germancoding.packetapi.defaultpackets
 
IDRegistry() - Constructor for class com.germancoding.packetapi.defaultpackets.IDRegistry
 
ignoreClosePackets() - Method in class com.germancoding.packetapi.DefaultPacketListener
 
ignoreHandshakePackets() - Method in class com.germancoding.packetapi.DefaultPacketListener
 
ignoreKeepAlivePackets() - Method in class com.germancoding.packetapi.DefaultPacketListener
 
in - Variable in class com.germancoding.packetapi.PacketHandler
 
isClosed() - Method in class com.germancoding.packetapi.PacketHandler
 
isCritical() - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
isCritical() - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
isCritical() - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
isCritical() - Method in class com.germancoding.packetapi.Packet
Defines whether this packet type is critical.
Critical means that the handle() function should never fail.
isHandshakeSend() - Method in class com.germancoding.packetapi.PacketHandler
 
isInstantFlush() - Method in class com.germancoding.packetapi.PacketHandler
 
isResponse() - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
isVersionApproved() - Method in class com.germancoding.packetapi.PacketHandler
 

K

KEEPALIVE_PACKET - Static variable in class com.germancoding.packetapi.defaultpackets.IDRegistry
 
KeepAlivePacket - Class in com.germancoding.packetapi.defaultpackets
 
KeepAlivePacket() - Constructor for class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 

L

logger - Variable in class com.germancoding.packetapi.PacketHandler
 

M

MAX_PACKET_SIZE - Static variable in class com.germancoding.packetapi.udp.UnreliableSocket
 

N

notifyOnDefaultPackets(boolean) - Method in class com.germancoding.packetapi.PacketHandler
Sets whether this library calls PacketListener.onPacketReceived() when default packets are received.

O

onConnectionClosed(PacketHandler, String, boolean) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
onConnectionClosed(PacketHandler, String, boolean) - Method in interface com.germancoding.packetapi.PacketListener
 
onConnectionClosed(String, boolean) - Method in class com.germancoding.packetapi.PacketHandler
Notifies this instance that the connection is closed (or will be closed now) for an external reason.
onConnectionFail(Exception) - Method in class com.germancoding.packetapi.PacketHandler
Notifies this instance that the connection has failed.
onConnectionFailed(PacketHandler, Throwable) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
onConnectionFailed(PacketHandler, Throwable) - Method in interface com.germancoding.packetapi.PacketListener
 
onPacketReceived(Packet) - Method in class com.germancoding.packetapi.PacketHandler
Called when a new packet was received.
onPacketReceived(PacketHandler, Packet) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
onPacketReceived(PacketHandler, Packet) - Method in interface com.germancoding.packetapi.PacketListener
 
onUnknownPacketReceived(short) - Method in class com.germancoding.packetapi.PacketHandler
 
onUnknownPacketReceived(PacketHandler, short) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
onUnknownPacketReceived(PacketHandler, short) - Method in interface com.germancoding.packetapi.PacketListener
 
out - Variable in class com.germancoding.packetapi.PacketHandler
 

P

Packet - Class in com.germancoding.packetapi
Represents a data packet that can be send and received over a network.
Note: Each subclass of this class has to define a nullary constructor (Constructor with no arguments)
Also, every class extending Packet should be careful with null.
Packet() - Constructor for class com.germancoding.packetapi.Packet
A nullary constructor.
PacketHandler - Class in com.germancoding.packetapi
 
PacketHandler(InputStream, OutputStream, String, PacketListener) - Constructor for class com.germancoding.packetapi.PacketHandler
Creates a new PacketHandler instance.
PacketListener - Interface in com.germancoding.packetapi
 
PacketWriter - Class in com.germancoding.packetapi
 
PacketWriter(short) - Constructor for class com.germancoding.packetapi.PacketWriter
 
prepare() - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
prepare() - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
prepare() - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
prepare() - Method in class com.germancoding.packetapi.Packet
Called by the DataSender when this packet is send over the network.
Process - Class in com.germancoding.packetapi
 
Process(Process.ActionType, short, Packet, PacketHandler) - Constructor for class com.germancoding.packetapi.Process
 
Process.ActionType - Enum in com.germancoding.packetapi
 
PROTOCOL_VERSION - Static variable in class com.germancoding.packetapi.PacketHandler
Applications can change this value if they want.

Q

queueEmpty() - Method in class com.germancoding.packetapi.DataSender
 

R

read() - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
RECEIVED - com.germancoding.packetapi.Process.ActionType
 
registerPacket(Class<? extends Packet>) - Method in class com.germancoding.packetapi.PacketHandler
Registers a new packet.
run() - Method in class com.germancoding.packetapi.DataReader
 
run() - Method in class com.germancoding.packetapi.DataSender
 

S

sendHandshake() - Method in class com.germancoding.packetapi.PacketHandler
Sends a handshake to exchange version numbers.
sendHandshake(int) - Method in class com.germancoding.packetapi.PacketHandler
Sends a handshake using the given id as the handshake id.
sendPacket(Packet) - Method in class com.germancoding.packetapi.DataSender
 
sendPacket(Packet) - Method in class com.germancoding.packetapi.PacketHandler
Sends the given packet by adding it to the sending queue.
sendQueue - Variable in class com.germancoding.packetapi.DataSender
 
setAutomaticPacketProcessing(boolean) - Method in class com.germancoding.packetapi.PacketHandler
 
setAutoSendKeepAlive(boolean) - Method in class com.germancoding.packetapi.PacketHandler
 
setCloseMessage(String) - Method in class com.germancoding.packetapi.defaultpackets.ClosePacket
 
setConnectionName(String) - Method in class com.germancoding.packetapi.PacketHandler
 
setDefaultPacketListener(DefaultPacketListener) - Method in class com.germancoding.packetapi.PacketHandler
 
setHandler(PacketHandler) - Method in class com.germancoding.packetapi.Process
 
setHandshakeID(int) - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
setHandshakeSend(boolean) - Method in class com.germancoding.packetapi.PacketHandler
 
setIgnoreClosePackets(boolean) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
setIgnoreHandshakePackets(boolean) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
setIgnoreKeepAlivePackets(boolean) - Method in class com.germancoding.packetapi.DefaultPacketListener
 
setInstantFlush(boolean) - Method in class com.germancoding.packetapi.PacketHandler
 
setLastContactAddress(InetAddress, int) - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
setLastContactPort(int) - Method in class com.germancoding.packetapi.udp.UnreliableInputStream
 
setLastPacketReceived(long) - Method in class com.germancoding.packetapi.PacketHandler
 
setLastPacketSend(long) - Method in class com.germancoding.packetapi.PacketHandler
 
setListener(PacketListener) - Method in class com.germancoding.packetapi.PacketHandler
 
setOverridePort(int) - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
setOverrideSendAddress(InetAddress) - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
setPacket(Packet) - Method in class com.germancoding.packetapi.Process
 
setPacketID(short) - Method in class com.germancoding.packetapi.Process
 
setProtocolVersion(int) - Method in class com.germancoding.packetapi.defaultpackets.HandshakePacket
 
setReader(DataReader) - Method in class com.germancoding.packetapi.PacketHandler
 
setRemoteAddress(InetAddress) - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
setRemotePort(int) - Method in class com.germancoding.packetapi.udp.UnreliableSocket
 
setRemoteProtocolVersion(int) - Method in class com.germancoding.packetapi.PacketHandler
 
setResponse(boolean) - Method in class com.germancoding.packetapi.defaultpackets.KeepAlivePacket
 
setSender(DataSender) - Method in class com.germancoding.packetapi.PacketHandler
 
setType(Process.ActionType) - Method in class com.germancoding.packetapi.Process
 
setVersionApproved(boolean) - Method in class com.germancoding.packetapi.PacketHandler
 
shouldSendKeepAlive() - Method in class com.germancoding.packetapi.PacketHandler
 
shutdown() - Method in class com.germancoding.packetapi.PacketHandler
Shuts down this PacketHandler instance silently without touching the underlying streams or sockets.
size() - Method in class com.germancoding.packetapi.PacketWriter
 

T

toByteArray() - Method in class com.germancoding.packetapi.PacketWriter
 

U

UNKN_RECEIVED - com.germancoding.packetapi.Process.ActionType
 
UnreliableInputStream - Class in com.germancoding.packetapi.udp
 
UnreliableInputStream(UnreliableSocket) - Constructor for class com.germancoding.packetapi.udp.UnreliableInputStream
 
UnreliableOutputStream - Class in com.germancoding.packetapi.udp
 
UnreliableOutputStream(UnreliableSocket) - Constructor for class com.germancoding.packetapi.udp.UnreliableOutputStream
 
UnreliableSocket - Class in com.germancoding.packetapi.udp
 
UnreliableSocket(DatagramSocket) - Constructor for class com.germancoding.packetapi.udp.UnreliableSocket
Creates a new UnreliableSocket with the given socket as the underlying socket.

V

valueOf(String) - Static method in enum com.germancoding.packetapi.Process.ActionType
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.germancoding.packetapi.Process.ActionType
Returns an array containing the constants of this enum type, in the order they are declared.

W

write(byte[]) - Method in class com.germancoding.packetapi.PacketWriter
 
write(byte[], int, int) - Method in class com.germancoding.packetapi.PacketWriter
 
write(int) - Method in class com.germancoding.packetapi.PacketWriter
 
write(int) - Method in class com.germancoding.packetapi.udp.UnreliableOutputStream
 
writeBoolean(boolean) - Method in class com.germancoding.packetapi.PacketWriter
 
writeByte(int) - Method in class com.germancoding.packetapi.PacketWriter
 
writeBytes(String) - Method in class com.germancoding.packetapi.PacketWriter
 
writeChar(int) - Method in class com.germancoding.packetapi.PacketWriter
 
writeChars(String) - Method in class com.germancoding.packetapi.PacketWriter
 
writeDouble(double) - Method in class com.germancoding.packetapi.PacketWriter
 
writeFloat(float) - Method in class com.germancoding.packetapi.PacketWriter
 
writeInt(int) - Method in class com.germancoding.packetapi.PacketWriter
 
writeLong(long) - Method in class com.germancoding.packetapi.PacketWriter
 
writeShort(int) - Method in class com.germancoding.packetapi.PacketWriter
 
writeUTF(String) - Method in class com.germancoding.packetapi.PacketWriter
 
A C D F G H I K L M N O P Q R S T U V W 
All Classes All Packages