Index
All Classes and Interfaces|All Packages
A
- accept() - Method in class com.example.common.transport.tcp.TcpSocketTransportListener
-
Accepts a connection on the listener and creates a new TcpSocketTransportConnection for communication.
- accept() - Method in interface com.example.common.transport.TransportListener
-
Accept a connection on the listener and return a TransportConnection object for communication.
- add(Command) - Method in class com.example.common.command.CommandsCollection
-
Adds a command to the collection using the command's name as the key and the command object as the value.
- add(Command) - Method in interface com.example.common.command.CommandsInterface
-
Add a command to the collection.
- add(ValidatorInterface) - Method in class com.example.common.validate.ListValidation
-
Add new type of validator to common list
- add(String) - Method in class com.example.server.lastmessages.CircularFifoBufferLastMessages
- add(String) - Method in interface com.example.server.lastmessages.LastMessages
-
Adds a new message to the collection of last messages.
- add(T) - Method in class com.example.server.handler.LinkedListMessageQueue
-
Add new message - request in processing
- add(T) - Method in interface com.example.server.handler.MessageQueue
-
Adds a message to the queue.
- add(T) - Method in class com.example.server.handler.MessageQueueExecutor
-
Add a message to the queue to be processed by the ThreadPoolExecutor.
- addBots(String, int, int, int, int) - Method in class com.example.bot.BaseBotWorker
-
Add bots to the server with specified parameters.
- addBots(String, int, int, int, int) - Method in interface com.example.bot.BotWorker
-
Add bots to the server with the specified parameters.
- addUser(ChatClient) - Method in class com.example.server.client.ChatClientsHashMap
-
Add new user to the chat
- addUser(ChatClient) - Method in interface com.example.server.client.ChatInterface
-
Add new user to the chat
B
- BaseBotWorker - Class in com.example.bot
-
The BaseBotWorker class implements the BotWorker interface for managing bots in the chat application.
- BaseBotWorker(StreamIO, TransportFactory) - Constructor for class com.example.bot.BaseBotWorker
-
Constructs a BaseBotWorker with the specified StreamIO and TransportFactory.
- BaseClient - Class in com.example.client.app
-
The BaseClient class implements the Client interface and represents a basic client working with a chat application.
- BaseClient(int, MessageSender, StreamIO, Listener) - Constructor for class com.example.client.app.BaseClient
-
Constructs a BaseClient with the specified client port, message sender, stream IO, and listener.
- BaseClientListener - Class in com.example.client.app
-
The BaseClientListener is a subclass of BaseListener that handles the communication with clients in the chat application.
- BaseClientListener(int, StreamIO, TransportFactory) - Constructor for class com.example.client.app.BaseClientListener
-
Constructs a BaseClientListener with the specified input port, StreamIO, and TransportFactory.
- BaseCommand - Class in com.example.common.command
-
Abstract class that serves as the base for command implementations.
- BaseCommand(MessageSender, ChatInterface) - Constructor for class com.example.common.command.BaseCommand
-
Constructor for the BaseCommand class.
- BaseJsonSerializer<T> - Class in com.example.common.json.serializer
-
Base class for Json serialization implementation.
- BaseJsonSerializer(Class<T>) - Constructor for class com.example.common.json.serializer.BaseJsonSerializer
-
Constructor for BaseJsonSerializer class.
- BaseListener - Class in com.example.common.listener
-
BaseListener class implements a basic listener functionality for receiving and sending messages.
- BaseListener(int, StreamIO, TransportFactory) - Constructor for class com.example.common.listener.BaseListener
-
Constructor for BaseListener class.
- BaseMessageSender - Class in com.example.client.sender
-
The BaseMessageSender class implements the MessageSender interface for sending messages with a body message payload.
- BaseMessageSender(TransportFactory, String, int) - Constructor for class com.example.client.sender.BaseMessageSender
-
Constructs a BaseMessageSender with the specified transport factory, server IP, and port number.
- BaseServer - Class in com.example.server.app
-
The BaseServer class implements the Server interface and represents the core server application.
- BaseServer(int, StreamIO, TransportFactory) - Constructor for class com.example.server.app.BaseServer
-
Constructor for BaseServer.
- BaseServerListener - Class in com.example.server.app
-
Derived class representing a listener for a server application.
- BaseServerListener(int, StreamIO, TransportFactory, MessageQueue<TransportConnection>) - Constructor for class com.example.server.app.BaseServerListener
-
Constructor for BaseServerListener.
- BaseService<T> - Class in com.example.common
-
The BaseService class is an abstract class that provides base functionality for service classes.
- BaseService(String) - Constructor for class com.example.common.BaseService
-
Constructs a BaseService with the specified file path.
- BaseValidator - Class in com.example.common.validate
-
The BaseValidator class is an abstract class that provides base functionality for validators.
- BaseValidator() - Constructor for class com.example.common.validate.BaseValidator
- BodyMessage - Class in com.example.common.json.bodymessage
-
This class represents a body message that can be sent in a JSON format.
- BodyMessage() - Constructor for class com.example.common.json.bodymessage.BodyMessage
- BodyMessageJsonSerializer - Class in com.example.common.json.bodymessage
-
This class is a custom JSON serializer for the BodyMessage class.
- BodyMessageJsonSerializer() - Constructor for class com.example.common.json.bodymessage.BodyMessageJsonSerializer
-
Constructor for the BodyMessageJsonSerializer class.
- BotService - Class in com.example.bot
-
The BotService class provides configuration properties and settings for the bot application.
- BotService() - Constructor for class com.example.bot.BotService
-
Constructs a BotService with configuration properties loaded from a file path.
- BotTimerTask - Class in com.example.bot
-
The BotTimerTask class extends TimerTask and represents a timer task for sending messages to clients.
- BotTimerTask() - Constructor for class com.example.bot.BotTimerTask
- BotWorker - Interface in com.example.bot
-
The BotWorker interface defines the methods for managing bots in the chat application.
C
- ChatClient - Class in com.example.server.client
- ChatClient() - Constructor for class com.example.server.client.ChatClient
- ChatClientsHashMap - Class in com.example.server.client
-
Class - collection for working with a list of chat users via ConcurrentHashMap.
- ChatClientsHashMap() - Constructor for class com.example.server.client.ChatClientsHashMap
- chatInterface - Variable in class com.example.common.command.BaseCommand
- ChatInterface - Interface in com.example.server.client
-
Interface for working with chat clients
- CircularFifoBufferLastMessages - Class in com.example.server.lastmessages
-
Implementation of working with a list of last messages via CircularFifoBuffer
- CircularFifoBufferLastMessages(int) - Constructor for class com.example.server.lastmessages.CircularFifoBufferLastMessages
- clear() - Method in class com.example.server.client.ChatClientsHashMap
-
Clear all the collection of clients in the chat
- clear() - Method in interface com.example.server.client.ChatInterface
-
Clen whole list
- clear() - Method in class com.example.server.lastmessages.CircularFifoBufferLastMessages
- clear() - Method in interface com.example.server.lastmessages.LastMessages
-
Clears all the last messages from the collection.
- Client - Interface in com.example.client
-
The Client interface defines methods for managing a client in the chat application.
- close() - Method in class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Close connection and free the resources
- close() - Method in class com.example.common.transport.tcp.TcpSocketTransportListener
-
Closes the server socket of the transport listener.
- close() - Method in interface com.example.common.transport.TransportConnection
-
Close the connection.
- close() - Method in interface com.example.common.transport.TransportListener
-
Close the transport listener and release any allocated resources.
- com.example.bot - package com.example.bot
- com.example.client - package com.example.client
- com.example.client.app - package com.example.client.app
- com.example.client.sender - package com.example.client.sender
- com.example.common - package com.example.common
- com.example.common.command - package com.example.common.command
- com.example.common.enums - package com.example.common.enums
- com.example.common.input - package com.example.common.input
- com.example.common.json.bodymessage - package com.example.common.json.bodymessage
- com.example.common.json.serializer - package com.example.common.json.serializer
- com.example.common.listener - package com.example.common.listener
- com.example.common.stream - package com.example.common.stream
- com.example.common.transport - package com.example.common.transport
- com.example.common.transport.tcp - package com.example.common.transport.tcp
- com.example.common.validate - package com.example.common.validate
- com.example.server - package com.example.server
- com.example.server.app - package com.example.server.app
- com.example.server.client - package com.example.server.client
- com.example.server.handler - package com.example.server.handler
- com.example.server.lastmessages - package com.example.server.lastmessages
- com.example.server.program - package com.example.server.program
- com.example.server.sender - package com.example.server.sender
- Command - Interface in com.example.common.command
-
The Command interface represents a command that can be executed based on a BodyMessage.
- CommandFactory - Class in com.example.common.command
-
The CommandFactory class provides static methods for creating different types of commands.
- CommandFactory() - Constructor for class com.example.common.command.CommandFactory
- CommandMessages - Enum Class in com.example.common.enums
-
The CommandMessages enum represents different command messages used in the application.
- CommandsCollection - Class in com.example.common.command
-
The CommandsCollection class implements the CommandsInterface using a HashMap to store commands.
- CommandsCollection() - Constructor for class com.example.common.command.CommandsCollection
- CommandsInterface - Interface in com.example.common.command
-
The CommandsInterface provides methods to manage a collection of commands.
- ConsoleStreamIO - Class in com.example.common.stream
-
The ConsoleStreamIO class implements the StreamIO interface for interacting with the console input and output.
- ConsoleStreamIO() - Constructor for class com.example.common.stream.ConsoleStreamIO
- contains(String) - Method in class com.example.common.command.CommandsCollection
-
Checks if a command with the specified name exists in the collection.
- contains(String) - Method in interface com.example.common.command.CommandsInterface
-
Check if the collection contains a command with the specified name.
- containsUser(String) - Method in class com.example.server.client.ChatClientsHashMap
-
Check if there is such client in chat
- containsUser(String) - Method in interface com.example.server.client.ChatInterface
-
Check if client is in the chat
- CountUserCommand - Class in com.example.common.command
-
Class for user command COUNT_USERS
- CountUserCommand(MessageSender, ChatInterface) - Constructor for class com.example.common.command.CountUserCommand
-
Constructor for the CountUserCommand.
- countUsers() - Method in class com.example.server.client.ChatClientsHashMap
-
Get the number of users in the chat
- countUsers() - Method in interface com.example.server.client.ChatInterface
-
Count all users in the chat
- createBodyMessage(String, String, String, String, int) - Static method in class com.example.common.json.serializer.MessageFactory
-
Creates a new BodyMessage object with the specified parameters.
- createConnection(String, int, String) - Method in class com.example.common.transport.tcp.TcpSocketTransportFactory
-
Create a TCP socket transport connection to the specified IP address and port with the given encoding.
- createConnection(String, int, String) - Method in interface com.example.common.transport.TransportFactory
-
Create a transport connection to the specified IP address and port with the given encoding.
- createListener(int, int, String) - Method in class com.example.common.transport.tcp.TcpSocketTransportFactory
-
Create a TCP socket transport listener on the specified port with the given maximum count of connections and encoding.
- createListener(int, int, String) - Method in interface com.example.common.transport.TransportFactory
-
Create a transport listener that listens on the specified port with the given maximum count of connections.
D
- description - Variable in class com.example.common.command.BaseCommand
- deserialize(String) - Method in class com.example.common.json.serializer.BaseJsonSerializer
-
Deserialize a JSON String to an object.
- deserialize(String) - Method in interface com.example.common.json.serializer.JsonSerializer
-
Deserialize a JSON message to an object.
E
- ERROR - Enum constant in enum class com.example.common.enums.Status
- execute(BodyMessage) - Method in interface com.example.common.command.Command
-
Executes the command based on the provided BodyMessage.
- execute(BodyMessage) - Method in class com.example.common.command.CountUserCommand
-
Executes the CountUserCommand by sending the count of users to the requesting client.
- execute(BodyMessage) - Method in class com.example.common.command.ExitCommand
-
Executes the ExitCommand by removing the user from the chat and sending a goodbye message to all clients.
- execute(BodyMessage) - Method in class com.example.common.command.HelpCommand
-
Executes the HelpCommand by sending the list of available commands to the requesting client.
- execute(BodyMessage) - Method in class com.example.common.command.LoginCommand
-
Executes the LoginCommand by logging in a client to the chat.
- execute(BodyMessage) - Method in class com.example.common.command.MessageCommand
-
Executes the MessageCommand by processing the body message received from a user.
- EXIT - Enum constant in enum class com.example.common.enums.CommandMessages
- ExitCommand - Class in com.example.common.command
-
Class for user command - EXIT
- ExitCommand(MessageSender, ChatInterface) - Constructor for class com.example.common.command.ExitCommand
-
Constructor for the ExitCommand.
G
- getAllCommands() - Method in class com.example.common.command.CommandsCollection
-
Returns a collection containing all the commands stored in the collection.
- getAllCommands() - Method in interface com.example.common.command.CommandsInterface
-
Get all commands in the collection.
- getAllUsers() - Method in class com.example.server.client.ChatClientsHashMap
-
Get list of all clients in the chat
- getAllUsers() - Method in interface com.example.server.client.ChatInterface
-
Receive the list of all clients in current chat
- getByName(String) - Method in class com.example.common.command.CommandsCollection
-
Retrieves a command from the collection based on its name.
- getByName(String) - Method in interface com.example.common.command.CommandsInterface
-
Get a command by its name.
- getClients() - Method in class com.example.bot.BotTimerTask
-
Retrieves the list of clients associated with the timer task.
- getCommandsCollection() - Static method in class com.example.common.command.CommandFactory
-
Returns a new instance of CommandsCollection.
- getCountThreads() - Method in class com.example.server.handler.LinkedListMessageQueue
-
Get number of threads in pool
- getCountThreads() - Method in interface com.example.server.handler.MessageQueue
-
Gets the number of threads currently accessing the message queue.
- getCountThreads() - Method in class com.example.server.handler.MessageQueueExecutor
-
Get the current number of threads in the ThreadPoolExecutor.
- getCountUserCommand(MessageSender, ChatInterface) - Static method in class com.example.common.command.CommandFactory
-
Creates and returns a CountUserCommand object.
- getDescription() - Method in class com.example.common.command.BaseCommand
-
Get the description of the command.
- getDescription() - Method in interface com.example.common.command.Command
-
Gets the description of the command.
- getExitCommand(MessageSender, ChatInterface) - Static method in class com.example.common.command.CommandFactory
-
Creates and returns an ExitCommand object.
- getHelpCommand(CommandsInterface, MessageSender, ChatInterface) - Static method in class com.example.common.command.CommandFactory
-
Creates and returns a HelpCommand object.
- getInputValue(String) - Method in class com.example.common.input.Input
-
Retrieves input from the user and returns it as a string.
- getInstance() - Static method in class com.example.bot.BotService
-
Retrieves the singleton instance of the BotService class.
- getInstance() - Static method in class com.example.common.Service
-
Returns the singleton instance of the Service class.
- getIntegerNumberValidator(String) - Static method in class com.example.common.validate.ValidatorFactory
-
Creates an ValidateIntegerNumber Validator with the specified value.
- getIp() - Method in class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Retrieves the IP address of the connection.
- getIp() - Method in interface com.example.common.transport.TransportConnection
-
Get the IP address of the connection.
- getIpServer() - Method in class com.example.common.input.InputWorker
-
Method to get the IP address of the server.
- getIpValidator(String) - Static method in class com.example.common.validate.ValidatorFactory
-
Creates an IpValidator Validator with the specified value.
- getLastMessages() - Method in class com.example.server.lastmessages.CircularFifoBufferLastMessages
- getLastMessages() - Method in interface com.example.server.lastmessages.LastMessages
-
Returns a collection of the last messages.
- getLoginCommand(MessageSender, ChatInterface) - Static method in class com.example.common.command.CommandFactory
-
Creates and returns a LoginCommand object.
- getMessageCommand(MessageSender, ChatInterface, CommandsInterface) - Static method in class com.example.common.command.CommandFactory
-
Creates and returns a MessageCommand object.
- getName() - Method in class com.example.common.command.BaseCommand
-
Get the name of the command.
- getName() - Method in interface com.example.common.command.Command
-
Gets the name of the command.
- getNextMessage() - Method in class com.example.server.handler.LinkedListMessageQueue
-
Get the request from queue
- getNextMessage() - Method in interface com.example.server.handler.MessageQueue
-
Gets the next message in the queue.
- getNextMessage() - Method in class com.example.server.handler.MessageQueueExecutor
-
Get the next message from the queue to be processed.
- getNickName(String) - Method in class com.example.common.input.InputWorker
-
Method to get the nickname of the user.
- getNotUsedPortValidation(String, TransportFactory) - Static method in class com.example.common.validate.ValidatorFactory
-
Creates a NotUsedPortsValidator Validator with the specified value and transport factory.
- getPortClient() - Method in class com.example.common.input.InputWorker
-
Method to initialize the port for incoming messages
- getPortServer() - Method in class com.example.common.input.InputWorker
-
Method to get the port number for the input server.
- getPortToServer() - Method in class com.example.common.input.InputWorker
-
Method to initialize the port that connects to the server
- getPortValidation(String, int, int, Boolean, TransportFactory) - Static method in class com.example.common.validate.ValidatorFactory
-
Creates a compound PortValidation Validator with integer number, range and not used port validation.
- getRangeNumberValidation(String, int, int) - Static method in class com.example.common.validate.ValidatorFactory
-
Creates a RangeNumberValidation Validator with the specified value, minimum, and maximum values.
- getTextCommand() - Method in enum class com.example.common.enums.CommandMessages
-
Get the text representation of the command.
- getUser(String) - Method in class com.example.server.client.ChatClientsHashMap
-
Search user by his name
- getUser(String) - Method in interface com.example.server.client.ChatInterface
-
Search and return user from chat
- getValidator(String) - Method in class com.example.common.input.Input
-
Abstract method to get the appropriate validator for the input text.
- getValidator(String) - Method in class com.example.common.input.InputIp
-
Returns the validator for the given IP address.
- getValidator(String) - Method in class com.example.common.input.InputPort
-
Retrieves and returns a ValidatorInterface object for validating the input value.
- getValue() - Method in class com.example.common.input.Input
-
Abstract method to get the user input of type T.
- getValue() - Method in class com.example.common.input.InputIp
-
Returns the validated IP address value.
- getValue() - Method in class com.example.common.input.InputPort
-
Retrieves and returns the validated Integer value from the input text.
- getValueAfterValidation() - Method in class com.example.common.input.Input
-
Gets user input after validating it with the specified ValidatorInterface.
H
- handle(BodyMessage) - Method in class com.example.server.handler.ResponseHandler
-
Handles the outgoing response message to be sent to a client.
- handle(TransportConnection) - Method in class com.example.server.handler.RequestHandler
-
Handles the incoming request from the TransportConnection.
- handle(T) - Method in interface com.example.server.handler.MessageHandler
-
Handles the incoming message.
- HandleThread - Interface in com.example.server.handler
-
This interface defines thread for processing message from queue.
- HelpCommand - Class in com.example.common.command
-
The HelpCommand class represents a command that displays all available chat commands to a client.
- HelpCommand(MessageSender, ChatInterface, CommandsInterface) - Constructor for class com.example.common.command.HelpCommand
-
Constructs a HelpCommand with the given MessageSender, ChatInterface, and CommandsInterface.
I
- Input<T> - Class in com.example.common.input
-
This class represents an abstract input class that handles user input.
- Input() - Constructor for class com.example.common.input.Input
- InputIp - Class in com.example.common.input
-
This class represents an input for IP addresses.
- InputIp() - Constructor for class com.example.common.input.InputIp
- InputPort - Class in com.example.common.input
-
Class representing an input port value.
- InputPort() - Constructor for class com.example.common.input.InputPort
- InputWorker - Class in com.example.common.input
-
The InputWorker class is responsible for handling user input for various network related parameters.
- InputWorker(StreamIO, TransportFactory) - Constructor for class com.example.common.input.InputWorker
-
Constructor for InputWorker class.
- interrupt() - Method in interface com.example.common.listener.Listener
-
Interrupts the listener.
- IpValidator - Class in com.example.common.validate
-
The IpValidator class extends the BaseValidator class and implements the ValidatorInterface for validating IP addresses.
- IpValidator(String) - Constructor for class com.example.common.validate.IpValidator
-
Constructs an IpValidator object with the specified value.
- isProcessing() - Method in interface com.example.server.handler.HandleThread
-
Checks if the thread is currently processing.
- isProcessing() - Method in class com.example.server.handler.SimpleHandleThread
-
Check if the thread is currently processing messages.
J
- JsonSerializer<T> - Interface in com.example.common.json.serializer
-
This is a common JSON serializer interface.
K
- killThread() - Method in interface com.example.server.handler.HandleThread
-
Stops the thread execution.
- killThread() - Method in class com.example.server.handler.SimpleHandleThread
-
Stop the execution of the current thread.
L
- LastMessages - Interface in com.example.server.lastmessages
-
The LastMessages interface represents a collection of last messages in a chat application.
- LinkedListMessageQueue<T> - Class in com.example.server.handler
-
Queue for message processing
- LinkedListMessageQueue(int, int, MessageHandler<T>) - Constructor for class com.example.server.handler.LinkedListMessageQueue
- Listener - Interface in com.example.common.listener
-
The Listener interface provides methods for starting, interrupting, and setting a listener as a daemon.
- ListValidation - Class in com.example.common.validate
-
The ListValidation class implements the ValidatorInterface to validate a list of validators.
- ListValidation() - Constructor for class com.example.common.validate.ListValidation
- login(String) - Method in class com.example.client.app.BaseClient
-
Logs in with the specified nickname and client port.
- login(String) - Method in interface com.example.client.Client
-
Logs in the client with the specified nickname.
- LOGIN - Enum constant in enum class com.example.common.enums.CommandMessages
- LoginCommand - Class in com.example.common.command
-
This class represents a command to log in a client to the chat.
- LoginCommand(MessageSender, ChatInterface) - Constructor for class com.example.common.command.LoginCommand
-
Constructor for the LoginCommand.
- logoutAndStop() - Method in class com.example.client.app.BaseClient
-
Logs out and stops the client by sending an exit command and interrupting the listener.
- logoutAndStop() - Method in interface com.example.client.Client
-
Logs out the client from the chat application and stops its operation.
M
- main(String[]) - Static method in class com.example.bot.Main
- main(String[]) - Static method in class com.example.client.Main
- main(String[]) - Static method in class com.example.server.Main
- main(String[]) - Static method in class com.example.server.program.Program
- Main - Class in com.example.bot
- Main - Class in com.example.client
- Main - Class in com.example.server
- Main() - Constructor for class com.example.bot.Main
- Main() - Constructor for class com.example.client.Main
- Main() - Constructor for class com.example.server.Main
- MESSAGE - Enum constant in enum class com.example.common.enums.CommandMessages
- MessageCommand - Class in com.example.common.command
-
The MessageCommand class represents a command that handles user messages in the chat application.
- MessageCommand(MessageSender, ChatInterface, CommandsInterface) - Constructor for class com.example.common.command.MessageCommand
- MessageFactory - Class in com.example.common.json.serializer
-
The MessageFactory class is responsible for creating instances of the BodyMessage class.
- MessageFactory() - Constructor for class com.example.common.json.serializer.MessageFactory
- MessageHandler<T> - Interface in com.example.server.handler
-
Interface for processing messages from the queue.
- MessageHandlerRunnable<T> - Class in com.example.server.handler
-
Runnable implementation for handling a message using a MessageHandler.
- MessageHandlerRunnable(T, MessageHandler<T>) - Constructor for class com.example.server.handler.MessageHandlerRunnable
-
Construct a MessageHandlerRunnable with the specified message and message handler.
- MessageQueue<T> - Interface in com.example.server.handler
-
The MessageQueue interface represents a queue for storing and retrieving messages of type T.
- MessageQueueExecutor<T> - Class in com.example.server.handler
-
The MessageQueueExecutor class implements a message queue using a ThreadPoolExecutor to handle incoming messages concurrently.
- MessageQueueExecutor(int, int, MessageHandler<T>) - Constructor for class com.example.server.handler.MessageQueueExecutor
-
Constructor for creating a MessageQueueExecutor instance with the given minimum and maximum threads and a MessageHandler.
- messageSender - Variable in class com.example.common.command.BaseCommand
- MessageSender - Interface in com.example.client.sender
-
The MessageSender interface defines methods for sending messages with the specified body message.
- MessageSender - Interface in com.example.server.sender
-
Interface for sending messages to clients in a chat application.
N
- name - Variable in class com.example.common.command.BaseCommand
- NotUsedPortsValidator - Class in com.example.common.validate
-
The NotUsedPortsValidator class extends the BaseValidator class and implements the ValidatorInterface.
- NotUsedPortsValidator(String, TransportFactory) - Constructor for class com.example.common.validate.NotUsedPortsValidator
-
Constructs a NotUsedPortsValidator with the specified value and transport factory.
P
- print(String) - Method in class com.example.common.stream.ConsoleStreamIO
-
Print the specified text to the output stream.
- print(String) - Method in interface com.example.common.stream.StreamIO
-
Print the specified text to the stream.
- Program - Class in com.example.server.program
- Program(Integer) - Constructor for class com.example.server.program.Program
- properties - Variable in class com.example.common.BaseService
R
- RangeNumberValidation - Class in com.example.common.validate
-
The RangeNumberValidation class extends the BaseValidator class and implements the ValidatorInterface for validating a number within a specific range.
- RangeNumberValidation(String, int, int) - Constructor for class com.example.common.validate.RangeNumberValidation
-
Constructs a RangeNumberValidation object with the specified value, minimum, and maximum values.
- read() - Method in class com.example.common.stream.ConsoleStreamIO
-
Read input from the input stream.
- read() - Method in interface com.example.common.stream.StreamIO
-
Read input from the stream.
- receive() - Method in class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Receive and buffered read stream of chars from server via tcp - socket connection.
- receive() - Method in interface com.example.common.transport.TransportConnection
-
Receive a message from the connection.
- remove(int) - Method in class com.example.common.validate.ListValidation
-
Removes a validator from the list at the specified index.
- remove(String) - Method in class com.example.common.command.CommandsCollection
-
Removes a command from the collection using its name as the key.
- remove(String) - Method in interface com.example.common.command.CommandsInterface
-
Remove a command by its name from the collection.
- removeBots(int) - Method in class com.example.bot.BaseBotWorker
-
Remove bots from the server at a specified interval.
- removeBots(int) - Method in interface com.example.bot.BotWorker
-
Remove bots from the server at a specified interval.
- removeUser(String) - Method in class com.example.server.client.ChatClientsHashMap
-
Remove user from thw current chat
- removeUser(String) - Method in interface com.example.server.client.ChatInterface
-
Remove user from the chat
- RequestHandler - Class in com.example.server.handler
-
This class is responsible for handling incoming requests from a TransportConnection.
- RequestHandler(CommandsInterface) - Constructor for class com.example.server.handler.RequestHandler
-
Constructor for RequestHandler class.
- ResponseHandler - Class in com.example.server.handler
-
This class is responsible for handling outgoing responses to be sent to clients.
- ResponseHandler(ChatInterface, TransportFactory) - Constructor for class com.example.server.handler.ResponseHandler
-
Constructor for ResponseHandler class.
- run() - Method in class com.example.bot.BotTimerTask
-
Executes the timer task by sending random messages to clients.
- run() - Method in class com.example.common.listener.BaseListener
-
Continuously waits for incoming messages and processes them using the worker method.
- run() - Method in class com.example.server.handler.MessageHandlerRunnable
-
Run method to handle the message using the MessageHandler.
- run() - Method in class com.example.server.handler.SimpleHandleThread
-
Main processing loop of the thread.
S
- send(String) - Method in class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Send stream of chars (message) from client via tcp - socket connection
- send(String) - Method in interface com.example.common.transport.TransportConnection
-
Send a message through the connection.
- sendLastMessages(ChatClient) - Method in interface com.example.server.sender.MessageSender
-
Sends the last messages to a specific client upon connecting.
- sendLastMessages(ChatClient) - Method in class com.example.server.sender.SimpleMessageSender
-
Sends the last messages to a specific client upon connecting.
- sendMessage(BodyMessage) - Method in class com.example.client.sender.BaseMessageSender
-
Sends a message with the specified BodyMessage payload to the server.
- sendMessage(BodyMessage) - Method in interface com.example.client.sender.MessageSender
-
Sends a message with the specified BodyMessage payload.
- sendMessage(ChatClient, String) - Method in interface com.example.server.sender.MessageSender
-
Sends a message to a specific client.
- sendMessage(ChatClient, String) - Method in class com.example.server.sender.SimpleMessageSender
-
Sends a message to a specific chat client.
- sendMessage(String) - Method in class com.example.client.app.BaseClient
-
Sends a message to the server with the client's nickname and message content.
- sendMessage(String) - Method in interface com.example.client.Client
-
Sends a message from the client to the chat application server.
- sendMessageToClient(String, String, ChatInterface) - Method in interface com.example.server.sender.MessageSender
-
Sends a message to a specific client identified by their nickname.
- sendMessageToClient(String, String, ChatInterface) - Method in class com.example.server.sender.SimpleMessageSender
-
Sends a message from a user to all other clients except the sender.
- serialize(T) - Method in class com.example.common.json.serializer.BaseJsonSerializer
-
Serialize an object to a JSON String.
- serialize(T) - Method in interface com.example.common.json.serializer.JsonSerializer
-
Serialize an object to JSON representation.
- Server - Interface in com.example.server
-
The Server interface defines the methods for starting and stopping a server.
- Service - Class in com.example.common
-
The Service class provides configuration properties and settings for the application.
- setClients(List<Client>) - Method in class com.example.bot.BotTimerTask
-
Sets the list of clients for the timer task.
- setDaemon(boolean) - Method in interface com.example.common.listener.Listener
-
Sets the listener as a daemon if the parameter is true.
- shutdown() - Method in class com.example.server.handler.LinkedListMessageQueue
-
Stop the queue processing
- shutdown() - Method in interface com.example.server.handler.MessageQueue
-
Shuts down the message queue, stopping any further messages from being added or retrieved.
- shutdown() - Method in class com.example.server.handler.MessageQueueExecutor
-
Shutdown the ThreadPoolExecutor, preventing new tasks from being accepted.
- SimpleHandleThread<T> - Class in com.example.server.handler
-
Class - implementation of message processing as a usual Thread.
- SimpleHandleThread(MessageQueue<T>, MessageHandler<T>) - Constructor for class com.example.server.handler.SimpleHandleThread
-
Constructor for SimpleHandleThread.
- SimpleMessageSender - Class in com.example.server.sender
-
Class responsible for handling message sending functionality within a server application.
- SimpleMessageSender(LastMessages, MessageQueue<BodyMessage>) - Constructor for class com.example.server.sender.SimpleMessageSender
-
Constructor for SimpleMessageSender.
- size() - Method in class com.example.common.command.CommandsCollection
-
Returns the number of commands stored in the collection.
- size() - Method in interface com.example.common.command.CommandsInterface
-
Get the size of the collection.
- size() - Method in class com.example.common.validate.ListValidation
-
Returns the number of validators in the list.
- start() - Method in class com.example.client.app.BaseClient
-
Starts the work of the client, including setting up the listener and reading user input.
- start() - Method in interface com.example.client.Client
-
Starts the client, facilitating communication in the chat application.
- start() - Method in interface com.example.common.listener.Listener
-
Starts the listener.
- start() - Method in class com.example.server.app.BaseServer
-
Start server
- start() - Method in interface com.example.server.handler.HandleThread
-
Starts the thread execution.
- start() - Method in interface com.example.server.Server
-
Starts the server.
- startListener() - Method in class com.example.client.app.BaseClient
-
Launch the input message listener
- startListener() - Method in interface com.example.client.Client
-
Starts the listener for incoming messages from the chat application server.
- startSendMessage(int, int) - Method in class com.example.bot.BaseBotWorker
-
Start sending messages with a specified timer and interval for sending messages.
- startSendMessage(int, int) - Method in interface com.example.bot.BotWorker
-
Start sending messages with a specified timer and interval for sending messages.
- Status - Enum Class in com.example.common.enums
-
The Status enum represents the possible statuses of an operation.
- stop() - Method in class com.example.server.app.BaseServer
-
Stop server
- stop() - Method in interface com.example.server.Server
-
Stops the server.
- streamIO - Variable in class com.example.common.listener.BaseListener
- StreamIO - Interface in com.example.common.stream
-
The StreamIO interface defines methods for printing text and reading input from a stream.
- SUCCESS - Enum constant in enum class com.example.common.enums.Status
T
- TcpSocketTransportConnection - Class in com.example.common.transport.tcp
-
The TcpSocketTransportConnection class implements the TransportConnection interface for managing a TCP socket connection.
- TcpSocketTransportConnection(String, int, String) - Constructor for class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Constructs a TcpSocketTransportConnection with a new socket connected to the specified IP and port.
- TcpSocketTransportConnection(Socket, String) - Constructor for class com.example.common.transport.tcp.TcpSocketTransportConnection
-
Constructs a TcpSocketTransportConnection with an existing socket and encoding.
- TcpSocketTransportFactory - Class in com.example.common.transport.tcp
-
The TcpSocketTransportFactory class implements the TransportFactory interface for creating TCP socket listeners and connections.
- TcpSocketTransportFactory() - Constructor for class com.example.common.transport.tcp.TcpSocketTransportFactory
- TcpSocketTransportListener - Class in com.example.common.transport.tcp
-
The TcpSocketTransportListener class implements the TransportListener interface for managing a TCP socket listener.
- TcpSocketTransportListener(int, int, String) - Constructor for class com.example.common.transport.tcp.TcpSocketTransportListener
-
Constructs a TcpSocketTransportListener with the specified port number, maximum count of connections, and encoding.
- TransportConnection - Interface in com.example.common.transport
-
The TransportConnection interface defines methods for managing a connection for sending and receiving messages.
- TransportFactory - Interface in com.example.common.transport
-
The TransportFactory interface defines methods for creating transport listeners and connections.
- transportListener - Variable in class com.example.common.listener.BaseListener
- TransportListener - Interface in com.example.common.transport
-
The TransportListener interface defines methods for managing a transport listener that accepts connections.
V
- validate() - Method in class com.example.common.validate.IpValidator
-
Validates the IP address value using a regular expression pattern.
- validate() - Method in class com.example.common.validate.ListValidation
-
Validates each validator in the list.
- validate() - Method in class com.example.common.validate.NotUsedPortsValidator
-
Validates if the specified port is not already in use by creating a transport listener on that port.
- validate() - Method in class com.example.common.validate.RangeNumberValidation
-
Validates whether the value falls within the specified range.
- validate() - Method in class com.example.common.validate.ValidateIntegerNumber
-
Validates the value as an integer number using a regular expression pattern.
- validate() - Method in interface com.example.common.validate.ValidatorInterface
-
Validates the data according to specific rules.
- ValidateIntegerNumber - Class in com.example.common.validate
-
The ValidateIntegerNumber class extends the BaseValidator class and implements the ValidatorInterface for validating integer numbers.
- ValidateIntegerNumber(String) - Constructor for class com.example.common.validate.ValidateIntegerNumber
-
Constructs a ValidateIntegerNumber object with the specified value.
- ValidatorFactory - Class in com.example.common.validate
-
The ValidatorFactory class provides static methods for creating instances of various Validators.
- ValidatorFactory() - Constructor for class com.example.common.validate.ValidatorFactory
- ValidatorInterface - Interface in com.example.common.validate
-
Interface for validation (in common)
- value - Variable in class com.example.common.validate.BaseValidator
- valueOf(String) - Static method in enum class com.example.common.enums.CommandMessages
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.example.common.enums.Status
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.example.common.enums.CommandMessages
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.example.common.enums.Status
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- worker() - Method in class com.example.client.app.BaseClientListener
-
Continuously waits for incoming messages from clients, prints the message, and closes the connection.
- worker() - Method in class com.example.common.listener.BaseListener
-
Abstract method that must be implemented by subclasses to define the processing of incoming messages.
- worker() - Method in class com.example.server.app.BaseServerListener
-
Worker method for the listener.
All Classes and Interfaces|All Packages