A B C D F G H I L N O P R S V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addLayer(DataPreProcessor.TransferMode, int, DataProcessingLayer) - Method in class dev.bitbite.networking.DataPreProcessor
-
Inserts a layer at the specified index.
- addLayer(DataPreProcessor.TransferMode, DataProcessingLayer) - Method in class dev.bitbite.networking.DataPreProcessor
-
Appends a layer at the end of the list
B
- broadcast(byte[]) - Method in class dev.bitbite.networking.Server
-
Sends the data to all connected clients.
C
- Client - Class in dev.bitbite.networking
-
Represents an abstract implementation of the client-side connection.
The connection process can be initiated using the client objectsClient.connect()method, which will return true, if the connection process has been successful.
Closing the connection can be done using the client objectsClient.close()method, which will return true, if the disconnection process has been completed successfully.
Incoming data from the server will be preprocessed byClient.preprocessReceivedData(byte[])and then forwarded toClient.processReceivedData(byte[]).
Data to the server can be sent using the clientsIOHandler.
Some events trigger the notification of registeredClientListeners. - Client(String, int) - Constructor for class dev.bitbite.networking.Client
-
Creates a Client object and sets the endpoint on which on startup the client will try to connect to
- Client(URL) - Constructor for class dev.bitbite.networking.Client
-
Creates a Client object and sets the endpoint to which the client will connect on startup.
- ClientCloseListener - Class in dev.bitbite.networking
- ClientCloseListener() - Constructor for class dev.bitbite.networking.ClientCloseListener
- ClientListener - Class in dev.bitbite.networking
-
This class contains all functions which, if registered at the client object, will be called when certain events are happening.
- ClientListener() - Constructor for class dev.bitbite.networking.ClientListener
- clientManager - Variable in class dev.bitbite.networking.Server
- ClientManager - Class in dev.bitbite.networking
-
Administrates the clients an runs in its own Thread.
- ClientManager(Server) - Constructor for class dev.bitbite.networking.ClientManager
-
Initiates a ClientManager object
- close() - Method in class dev.bitbite.networking.Client
-
Closes the connection.
Listeners will be called before the disconnection process is started and when it succeeded or failed.
It will also call the close method of the client objects IOHandler - close() - Method in class dev.bitbite.networking.ClientManager
-
Closes all client connection and the serversocket itself
- close() - Method in class dev.bitbite.networking.CommunicationHandler
-
Closes the IOStreams and the socket itself.
- close() - Method in class dev.bitbite.networking.IOHandler
-
Closes the streams
- close() - Method in class dev.bitbite.networking.Server
-
Initiates the closing process of the Server with closing the
ClientManagerand disabling theDataProcessingLayers. - CommunicationHandler - Class in dev.bitbite.networking
-
Manages the Communication with a client by handling its IO.
- CommunicationHandler(Socket, ClientManager) - Constructor for class dev.bitbite.networking.CommunicationHandler
-
Creates a CommunicationHandler object for a socket
- CommunicationHandlerCloseListener - Class in dev.bitbite.networking
- CommunicationHandlerCloseListener() - Constructor for class dev.bitbite.networking.CommunicationHandlerCloseListener
- connect() - Method in class dev.bitbite.networking.Client
-
Initiates the connection process.
The IOHandler will be created.
D
- dataPreProcessor - Variable in class dev.bitbite.networking.Server
- DataPreProcessor - Class in dev.bitbite.networking
-
Keeps track of all
DataProcessingLayers and processes data by passing it to each layer and returning its result. - DataPreProcessor() - Constructor for class dev.bitbite.networking.DataPreProcessor
-
Instantiates the DataPreProcessor
- DataPreProcessor.TransferMode - Enum in dev.bitbite.networking
-
The Transfer directions data can travel
- DataProcessingLayer - Interface in dev.bitbite.networking
-
Represents a single data processing layer.
- dev.bitbite.networking - package dev.bitbite.networking
- dev.bitbite.networking.exceptions - package dev.bitbite.networking.exceptions
- dev.bitbite.opennetlib - module dev.bitbite.opennetlib
- disconnectedClientDetector - Variable in class dev.bitbite.networking.Server
- DisconnectedClientDetector - Class in dev.bitbite.networking
-
This Thread attempts to detect disconnected clients.
- DisconnectedClientDetector(Server) - Constructor for class dev.bitbite.networking.DisconnectedClientDetector
- disconnectedServerDetector - Variable in class dev.bitbite.networking.Client
- DisconnectedServerDetector - Class in dev.bitbite.networking
-
This Thread attempts to detect if the server has closed the connection.
- DisconnectedServerDetector(Client) - Constructor for class dev.bitbite.networking.DisconnectedServerDetector
F
- flushRead() - Method in class dev.bitbite.networking.CommunicationHandler
-
Forces the currently read bytes to be handled
- flushRead() - Method in class dev.bitbite.networking.IOHandler
-
Calls the readCallback with the bytes currently contained in the buffer
G
- getCommunicationHandlerByIP(String) - Method in class dev.bitbite.networking.ClientManager
-
Searches for a
CommunicationHandlerby its sockets remote socket address and returns it. - getEndOfMessageByte() - Static method in class dev.bitbite.networking.IOHandler
-
Returns the byte that is currently set to mark the end of a message.
- getIP() - Method in class dev.bitbite.networking.CommunicationHandler
- getLayerAt(DataPreProcessor.TransferMode, int) - Method in class dev.bitbite.networking.DataPreProcessor
-
Returns a layer of the specified transfermode at a specified position in the list.
- getLayers(DataPreProcessor.TransferMode) - Method in class dev.bitbite.networking.DataPreProcessor
-
Returns the list of layers
- getMaxReadSize() - Static method in class dev.bitbite.networking.IOHandler
-
Returns the maximum count of bytes that are being read at one time.
- getTimeSinceLastRead() - Method in class dev.bitbite.networking.IOHandler
-
Returns the time that has passed since the last read in nanoseconds
H
I
- IN - dev.bitbite.networking.DataPreProcessor.TransferMode
- initLayers() - Method in class dev.bitbite.networking.DataPreProcessor
-
Initializes the
DataProcessingLayers - IOHandler - Class in dev.bitbite.networking
-
This IOHandler class combines an input- and an output stream object into a single class.
- IOHandler(InputStream, OutputStream, Consumer<byte[]>) - Constructor for class dev.bitbite.networking.IOHandler
-
Initializes the IOHandler with the given Streams and read-Callback method.
- IOHandlerListener - Class in dev.bitbite.networking
-
This class contains all functions which, if registered at the IOHandler object, will be called when certain events are happening.
- IOHandlerListener() - Constructor for class dev.bitbite.networking.IOHandlerListener
- iOListeners - Variable in class dev.bitbite.networking.Server
- isConnected() - Method in class dev.bitbite.networking.Client
-
Indicates whether the current client object has an active connection to the server
L
- LayerDisableFailedException - Exception in dev.bitbite.networking.exceptions
-
Gets thrown if the disabling process of the
DataProcessingLayerfailed. - LayerDisableFailedException(String) - Constructor for exception dev.bitbite.networking.exceptions.LayerDisableFailedException
- LayerInitFailedException - Exception in dev.bitbite.networking.exceptions
-
Gets thrown if the initialization of the
DataProcessingLayerfailed. - LayerInitFailedException(String) - Constructor for exception dev.bitbite.networking.exceptions.LayerInitFailedException
- listeners - Variable in class dev.bitbite.networking.Server
N
- notifyListeners(Server.EventType, Object...) - Method in class dev.bitbite.networking.Server
-
Calls the respective function of each listener depending on the event type.
Optionally Propagates additional info such as exceptions.
O
- onAccept(CommunicationHandler) - Method in class dev.bitbite.networking.ServerListener
-
Will be called once a client has been accepted by the server
- onAcceptEnd() - Method in class dev.bitbite.networking.ServerListener
-
Will be called once the server stops to accept clients
- onAcceptFailed(Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be called if an error occures while trying to accept a client
- onAcceptStart() - Method in class dev.bitbite.networking.ServerListener
-
Will be called before the server starts to accept clients
- onClose() - Method in class dev.bitbite.networking.ServerListener
-
Will be called before the closing process of the server is beeing initiated
- onCloseEnd() - Method in class dev.bitbite.networking.ClientCloseListener
- onCloseEnd() - Method in class dev.bitbite.networking.CommunicationHandlerCloseListener
- onCloseEnd() - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called once the streams have been closed
- onCloseEnd() - Method in class dev.bitbite.networking.ServerListener
-
Will be called once the server has been closed successfully
- onCloseFailed(Exception) - Method in class dev.bitbite.networking.ClientListener
-
Will be called if the disconnection and closing process failed
- onCloseFailed(Exception) - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called if an error occurs while trying to close the streams
- onCloseFailed(Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be called if an error occures while trying to close the server
- onCloseRequested() - Method in class dev.bitbite.networking.ClientListener
-
Will be called before the disconnection and closing processes being initiated
- onCloseStart() - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called before the closing of the streams is started
- onCloseSuccess() - Method in class dev.bitbite.networking.ClientListener
-
Will be called after finishing the disconnection process
- onCommunicationHandlerClose(CommunicationHandler) - Method in class dev.bitbite.networking.ServerListener
-
Will be called before a CommunicationHandler is tried to be closed
- onCommunicationHandlerCloseEnd(CommunicationHandler) - Method in class dev.bitbite.networking.ServerListener
-
Will be called once a CommunicationHandler is closed
- onCommunicationHandlerCloseFailed(CommunicationHandler, Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be called if the closing process fails
- onCommunicationHandlerInitFailed(Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be called if an error occures while trying to init the IOHandler inside the CommunicationHandler
- onConnectionCreation() - Method in class dev.bitbite.networking.ClientListener
-
Will be called before the Client tries to connect to the server
- onConnectionFailed(Exception) - Method in class dev.bitbite.networking.ClientListener
-
Will be called if an error occured while trying to connect to the server
- onConnectionSuccess() - Method in class dev.bitbite.networking.ClientListener
-
Will be called if the connection to the server was successful
- onDataReadEnd() - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called once the process of reading data from the inputStream ends
- onDataReadFailed(Exception) - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called if an error occurs while trying to read data from the inputStream
- onDataReadStart() - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called before the process of reading data from the inputStream is being started
- onDisable() - Method in interface dev.bitbite.networking.DataProcessingLayer
-
Gets called on
Server.close()to disable theDataProcessingLayer. - onEnable() - Method in interface dev.bitbite.networking.DataProcessingLayer
-
Gets called on
Server.start()to initialize theDataProcessingLayer. - onSocketClosed(Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be fired if the ServerSocket is closed while Client tried to connect.
- onSocketClosed(Exception, String) - Method in class dev.bitbite.networking.ServerListener
-
Will be fired if the ServerSocket is closed while Client tried to connect.
- onStart() - Method in class dev.bitbite.networking.ServerListener
-
Will be called before server startup
- onStartFailed(Exception) - Method in class dev.bitbite.networking.ServerListener
-
Will be called if server start failed
- onStartSuccess() - Method in class dev.bitbite.networking.ServerListener
-
Will be called after successful server start
- onWrite(byte[]) - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called before data is sent over the outputStream
- onWriteEnd() - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called after the writing to the outputStream has been finished
- onWriteFailed(Exception) - Method in class dev.bitbite.networking.IOHandlerListener
-
Will be called if the writing the data to the outputStream fails
- openServerSocket() - Method in class dev.bitbite.networking.Server
-
Opens the
ServerSocket. - openServerSocket() - Method in class dev.bitbite.networking.SSLServer
- openSocket() - Method in class dev.bitbite.networking.Client
-
Opens the Socket connection.
- openSocket() - Method in class dev.bitbite.networking.SSLClient
- OUT - dev.bitbite.networking.DataPreProcessor.TransferMode
P
- PORT - Variable in class dev.bitbite.networking.Client
- PORT - Variable in class dev.bitbite.networking.Server
- preprocessReceivedData(byte[]) - Method in class dev.bitbite.networking.Client
-
Preprocesses incomming data by sending it to the
DataPreProcessor. - process(byte[]) - Method in interface dev.bitbite.networking.DataProcessingLayer
-
Processes incoming data
- process(DataPreProcessor.TransferMode, byte[]) - Method in class dev.bitbite.networking.DataPreProcessor
-
Sends the data to each registered
DataProcessingLayerIf no DataProcessingLayer is registered, data will stay as it is and returns the processed data - processReceivedData(byte[]) - Method in class dev.bitbite.networking.Client
-
This function will be called once the client receives data from the server.
- processReceivedData(byte[]) - Method in class dev.bitbite.networking.CommunicationHandler
-
Gets called by the IOHandler when data is received from the client.
- processReceivedData(byte[]) - Method in class dev.bitbite.networking.SSLClient
- processReceivedData(String, byte[]) - Method in class dev.bitbite.networking.Server
-
This function will be called once the server receives data from the client.
- processReceivedData(String, byte[]) - Method in class dev.bitbite.networking.SSLServer
R
- read() - Method in class dev.bitbite.networking.IOHandler
-
Reads data from the inputstream if there is data available.
- readNBytes(int) - Method in class dev.bitbite.networking.CommunicationHandler
-
Blocks until the given amount of bytes are read
- readNBytes(int) - Method in class dev.bitbite.networking.IOHandler
-
Tries to read a set amount of bytes from the stream.
- readToNBytes(int) - Method in class dev.bitbite.networking.IOHandler
-
Reads bytes until the buffer contains the given amount of bytes
- registerListener(ClientListener) - Method in class dev.bitbite.networking.Client
-
Registers a ClientListener
- registerListener(IOHandlerListener) - Method in class dev.bitbite.networking.Client
-
Registers a IOHandlerListener
- registerListener(IOHandlerListener) - Method in class dev.bitbite.networking.CommunicationHandler
-
Registers a listener to the underlying IOHandler
- registerListener(IOHandlerListener) - Method in class dev.bitbite.networking.IOHandler
-
Registers a ClientListener
- registerListener(IOHandlerListener) - Method in class dev.bitbite.networking.Server
-
Registers an IOHandlerListener
- registerListener(ServerListener) - Method in class dev.bitbite.networking.Server
-
Registers a ClientListener
- registerListener(ArrayList<IOHandlerListener>) - Method in class dev.bitbite.networking.CommunicationHandler
-
Registers a list of listeners to the underlying IOHandler
- removeCommunicationHandler(CommunicationHandler) - Method in class dev.bitbite.networking.ClientManager
-
Removes the given communicationHandler from the list
- removeLayer(DataPreProcessor.TransferMode, DataProcessingLayer) - Method in class dev.bitbite.networking.DataPreProcessor
-
Removes a layer from the list
- removeListener(ClientListener) - Method in class dev.bitbite.networking.Client
-
Removes ClientListener from the listeners
- removeListener(IOHandlerListener) - Method in class dev.bitbite.networking.Client
-
Removes IOHandlerListener from the listeners
- removeListener(IOHandlerListener) - Method in class dev.bitbite.networking.IOHandler
-
Removes ClientListener from the listeners
- removeListener(IOHandlerListener) - Method in class dev.bitbite.networking.Server
-
Removes IOHandlerListener from the listeners
- removeListener(ServerListener) - Method in class dev.bitbite.networking.Server
-
Removes ClientListener from the listeners
- run() - Method in class dev.bitbite.networking.ClientManager
-
Starts the process of accepting clients to the server.
- run() - Method in class dev.bitbite.networking.DisconnectedClientDetector
- run() - Method in class dev.bitbite.networking.DisconnectedServerDetector
S
- send(byte[]) - Method in class dev.bitbite.networking.Client
-
Sends data to the Server
- send(byte[]) - Method in class dev.bitbite.networking.CommunicationHandler
-
Sends data to the client
- send(String, byte[]) - Method in class dev.bitbite.networking.Server
- Server - Class in dev.bitbite.networking
-
Represents an abstract implementation of the server-side connection.
The server must be started usingServer.start()for clients to be able to connect. - Server(int) - Constructor for class dev.bitbite.networking.Server
-
Creates a server object and sets the port the server will try to listen on
- ServerListener - Class in dev.bitbite.networking
-
This class contains all functions which, if registered at the server object, will be called when certain events are happening.
- ServerListener() - Constructor for class dev.bitbite.networking.ServerListener
- serverSocket - Variable in class dev.bitbite.networking.Server
- setEndOfMessageByte(byte) - Static method in class dev.bitbite.networking.IOHandler
-
Sets the byte that marks the end of a message.
- setMaxReadSize(int) - Static method in class dev.bitbite.networking.IOHandler
-
Sets the maximum count of bytes that are being read at one time.
- setMaxReadThreshold(long) - Method in class dev.bitbite.networking.DisconnectedClientDetector
-
Sets the minimum time in nanoseconds to wait since the last read to check for disconnection.
- setMaxReadThreshold(long) - Method in class dev.bitbite.networking.DisconnectedServerDetector
-
Sets the minimum time in nanoseconds to wait since the last read to check for disconnection.
- shutdown() - Method in class dev.bitbite.networking.DataPreProcessor
-
Deactivates the
DataProcessingLayers - socket - Variable in class dev.bitbite.networking.Client
- SSLClient - Class in dev.bitbite.networking
- SSLClient(String, int) - Constructor for class dev.bitbite.networking.SSLClient
- SSLServer - Class in dev.bitbite.networking
- SSLServer(int) - Constructor for class dev.bitbite.networking.SSLServer
- start() - Method in class dev.bitbite.networking.Server
-
Opens a
ServerSocket, initializes theDataProcessingLayers and starts listening on the specified port
V
- valueOf(String) - Static method in enum dev.bitbite.networking.DataPreProcessor.TransferMode
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum dev.bitbite.networking.DataPreProcessor.TransferMode
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- write(byte[]) - Method in class dev.bitbite.networking.IOHandler
-
Writes data to the OutputStream and flushes it.
All Classes All Packages