Index

A B C D E F G H I M O R S T V 
All Classes and Interfaces|All Packages

A

addSocketContextListener(SocketContextListener, boolean) - Method in interface com.aoapps.messaging.SocketContext
addSocketListener(SocketListener, boolean) - Method in interface com.aoapps.messaging.Socket
array - Variable in class com.aoapps.messaging.ByteArray
 

B

BYTE_ARRAY - Enum constant in enum com.aoapps.messaging.MessageType
 
ByteArray - Class in com.aoapps.messaging
Encapsulates a byte[] and the number of bytes used.
ByteArray(byte[]) - Constructor for class com.aoapps.messaging.ByteArray
Creates a new byte array wrapper.
ByteArray(byte[], int) - Constructor for class com.aoapps.messaging.ByteArray
Creates a new byte array wrapper.
ByteArrayMessage - Class in com.aoapps.messaging
A message that is a byte[].
ByteArrayMessage(byte[]) - Constructor for class com.aoapps.messaging.ByteArrayMessage
 
ByteArrayMessage(ByteArray) - Constructor for class com.aoapps.messaging.ByteArrayMessage
 

C

close() - Method in class com.aoapps.messaging.ByteArrayMessage
 
close() - Method in class com.aoapps.messaging.FileMessage
 
close() - Method in interface com.aoapps.messaging.Message
The message should be closed when it is no longer needed.
close() - Method in class com.aoapps.messaging.MultiMessage
Closes each of the underlying messages.
close() - Method in interface com.aoapps.messaging.Socket
Closing a socket also removes it from its context.
close() - Method in interface com.aoapps.messaging.SocketContext
Closes this context.
close() - Method in class com.aoapps.messaging.StringMessage
 
com.aoapps.messaging - package com.aoapps.messaging
 
com.aoapps.messaging.api - module com.aoapps.messaging.api
 

D

decode(ByteArray) - Static method in class com.aoapps.messaging.FileMessage
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(ByteArray) - Method in enum com.aoapps.messaging.MessageType
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(ByteArray) - Static method in class com.aoapps.messaging.MultiMessage
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(ByteArray) - Static method in class com.aoapps.messaging.StringMessage
StandardCharsets.UTF_8 decodes the message.
decode(ByteArray, IOSupplier<TempFileContext>) - Method in enum com.aoapps.messaging.MessageType
Constructs a message of this type from its byte array encoding using the provided temporary file context supplier as-needed.
decode(ByteArray, IOSupplier<TempFileContext>) - Static method in class com.aoapps.messaging.MultiMessage
Decodes the messages using the provided temporary file context suppler as-needed.
decode(ByteArray, TempFileContext) - Method in enum com.aoapps.messaging.MessageType
Deprecated.
Please use TempFileContext supplier which may defer creation until first needed.
decode(ByteArray, TempFileContext) - Static method in class com.aoapps.messaging.MultiMessage
Deprecated.
Please use TempFileContext supplier which may defer creation until first needed.
decode(ByteArray, File) - Static method in class com.aoapps.messaging.FileMessage
Restores this message into the provided file.
decode(String) - Static method in class com.aoapps.messaging.ByteArrayMessage
base-64 decodes the message.
decode(String) - Static method in class com.aoapps.messaging.FileMessage
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(String) - Method in enum com.aoapps.messaging.MessageType
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(String) - Static method in class com.aoapps.messaging.MultiMessage
Deprecated.
Please use TempFileContext supplier since File.deleteOnExit() is prone to memory leaks in long-running applications.
decode(String, IOSupplier<TempFileContext>) - Method in enum com.aoapps.messaging.MessageType
Constructs a message of this type from its string encoding using the provided temporary file context supplier as-needed.
decode(String, IOSupplier<TempFileContext>) - Static method in class com.aoapps.messaging.MultiMessage
Decodes the messages using the provided temporary file context supplier as-needed.
decode(String, TempFileContext) - Method in enum com.aoapps.messaging.MessageType
Deprecated.
Please use TempFileContext supplier which may defer creation until first needed.
decode(String, TempFileContext) - Static method in class com.aoapps.messaging.MultiMessage
Deprecated.
Please use TempFileContext supplier which may defer creation until first needed.
decode(String, File) - Static method in class com.aoapps.messaging.FileMessage
base-64 decodes the message into the provided file.

E

EMPTY_BYTE_ARRAY - Static variable in class com.aoapps.messaging.ByteArray
 
EMPTY_BYTE_ARRAY_MESSAGE - Static variable in class com.aoapps.messaging.ByteArrayMessage
 
EMPTY_MULTI_MESSAGE - Static variable in class com.aoapps.messaging.MultiMessage
 
EMPTY_STRING_MESSAGE - Static variable in class com.aoapps.messaging.StringMessage
 
encodeAsByteArray() - Method in class com.aoapps.messaging.ByteArrayMessage
 
encodeAsByteArray() - Method in class com.aoapps.messaging.FileMessage
 
encodeAsByteArray() - Method in interface com.aoapps.messaging.Message
Gets a binary representation of this message.
encodeAsByteArray() - Method in class com.aoapps.messaging.MultiMessage
Encodes the messages into a single ByteArray.
encodeAsByteArray() - Method in class com.aoapps.messaging.StringMessage
StandardCharsets.UTF_8 encodes the message.
encodeAsString() - Method in class com.aoapps.messaging.ByteArrayMessage
base-64 encodes the message.
encodeAsString() - Method in class com.aoapps.messaging.FileMessage
base-64 encodes the message.
encodeAsString() - Method in interface com.aoapps.messaging.Message
Gets a String representation of this message.
encodeAsString() - Method in class com.aoapps.messaging.MultiMessage
Encodes the messages into a single string.
encodeAsString() - Method in class com.aoapps.messaging.StringMessage
 
equals(Object) - Method in class com.aoapps.messaging.ByteArray
Two ByteArray are equal when they have the same size and each byte within the first size bytes are equal.
equals(Object) - Method in class com.aoapps.messaging.ByteArrayMessage
 
equals(Object) - Method in class com.aoapps.messaging.FileMessage
 
equals(Object) - Method in interface com.aoapps.messaging.Message
Two messages of the same type with the same body must be considered equal.
equals(Object) - Method in class com.aoapps.messaging.MultiMessage
 
equals(Object) - Method in class com.aoapps.messaging.StringMessage
 

F

FILE - Enum constant in enum com.aoapps.messaging.MessageType
 
FileMessage - Class in com.aoapps.messaging
A message that is a file.
FileMessage(File) - Constructor for class com.aoapps.messaging.FileMessage
 

G

getCloseTime() - Method in interface com.aoapps.messaging.Socket
Gets the time this connection closed or null if still connected.
getConnectRemoteSocketAddress() - Method in interface com.aoapps.messaging.Socket
Gets the remote address at connection time.
getConnectTime() - Method in interface com.aoapps.messaging.Socket
Gets the time this connection was established.
getFromTypeByte(byte) - Static method in enum com.aoapps.messaging.MessageType
Gets the message type for its numeric code.
getFromTypeChar(char) - Static method in enum com.aoapps.messaging.MessageType
Gets the message type for its character code.
getId() - Method in interface com.aoapps.messaging.Socket
Gets this socket's unique identifier.
getMessage() - Method in class com.aoapps.messaging.ByteArrayMessage
 
getMessage() - Method in class com.aoapps.messaging.FileMessage
 
getMessage() - Method in class com.aoapps.messaging.StringMessage
 
getMessages() - Method in class com.aoapps.messaging.MultiMessage
Gets the messages or empty list for none.
getMessageType() - Method in class com.aoapps.messaging.ByteArrayMessage
 
getMessageType() - Method in class com.aoapps.messaging.FileMessage
 
getMessageType() - Method in interface com.aoapps.messaging.Message
Gets the message type.
getMessageType() - Method in class com.aoapps.messaging.MultiMessage
 
getMessageType() - Method in class com.aoapps.messaging.StringMessage
 
getProtocol() - Method in interface com.aoapps.messaging.Socket
Gets the protocol, such as "http" or "tcp".
getRemoteSocketAddress() - Method in interface com.aoapps.messaging.Socket
Gets the most recently seen remote address.
getSocket(Identifier) - Method in interface com.aoapps.messaging.SocketContext
Gets the socket of the given ID or null if not found.
getSocketContext() - Method in interface com.aoapps.messaging.Socket
Gets the context this socket is running within.
getSockets() - Method in interface com.aoapps.messaging.SocketContext
Gets a snapshot of all active sockets.
getTypeByte() - Method in enum com.aoapps.messaging.MessageType
 
getTypeChar() - Method in enum com.aoapps.messaging.MessageType
 

H

hashCode() - Method in class com.aoapps.messaging.ByteArray
The hashCode is created from the first size bytes.
hashCode() - Method in class com.aoapps.messaging.ByteArrayMessage
 
hashCode() - Method in class com.aoapps.messaging.FileMessage
 
hashCode() - Method in interface com.aoapps.messaging.Message
The hash code must be consistent with equals.
hashCode() - Method in class com.aoapps.messaging.MultiMessage
 
hashCode() - Method in class com.aoapps.messaging.StringMessage
 

I

isClosed() - Method in interface com.aoapps.messaging.Socket
 
isClosed() - Method in interface com.aoapps.messaging.SocketContext
 
isTemp() - Method in class com.aoapps.messaging.FileMessage
 

M

Message - Interface in com.aoapps.messaging
Any type of encapsulated message.
MessageType - Enum in com.aoapps.messaging
The types of serializations.
MULTI - Enum constant in enum com.aoapps.messaging.MessageType
 
MultiMessage - Class in com.aoapps.messaging
A message that is a combination of multiple messages.
MultiMessage(Collection<? extends Message>) - Constructor for class com.aoapps.messaging.MultiMessage
Creates a new multi-message.

O

onError(SocketContext, Throwable) - Method in interface com.aoapps.messaging.SocketContextListener
Called when an error occurs.
onError(Socket, Throwable) - Method in interface com.aoapps.messaging.SocketListener
Called when an error occurs.
onMessages(Socket, List<? extends Message>) - Method in interface com.aoapps.messaging.SocketListener
Called when one or more new messages arrive.
onNewSocket(SocketContext, Socket) - Method in interface com.aoapps.messaging.SocketContextListener
Called when a new socket is created, but before it is started.
onRemoteSocketAddressChange(Socket, SocketAddress, SocketAddress) - Method in interface com.aoapps.messaging.SocketListener
Called when a new remote address is seen.
onSocketClose(Socket) - Method in interface com.aoapps.messaging.SocketListener
Called when a socket is closed.
onSocketContextClose(SocketContext) - Method in interface com.aoapps.messaging.SocketContextListener
Called when a socket context is closed.

R

removeSocketContextListener(SocketContextListener) - Method in interface com.aoapps.messaging.SocketContext
removeSocketListener(SocketListener) - Method in interface com.aoapps.messaging.Socket

S

sendMessage(Message) - Method in interface com.aoapps.messaging.Socket
Sends a single message.
sendMessages(Collection<? extends Message>) - Method in interface com.aoapps.messaging.Socket
Sends a set of messages.
size - Variable in class com.aoapps.messaging.ByteArray
 
Socket - Interface in com.aoapps.messaging
One established connection.
SocketContext - Interface in com.aoapps.messaging
Each socket, regardless or protocol and whether client or server, has a context.
SocketContextListener - Interface in com.aoapps.messaging
Receives notification on context events.
SocketListener - Interface in com.aoapps.messaging
Receives messages as they come in from the sockets.
start(Callback<? super Socket>, Callback<? super Throwable>) - Method in interface com.aoapps.messaging.Socket
Starts the I/O of a socket.
STRING - Enum constant in enum com.aoapps.messaging.MessageType
 
StringMessage - Class in com.aoapps.messaging
A message that is a String.
StringMessage(String) - Constructor for class com.aoapps.messaging.StringMessage
 

T

toString() - Method in class com.aoapps.messaging.ByteArrayMessage
 
toString() - Method in class com.aoapps.messaging.FileMessage
 
toString() - Method in class com.aoapps.messaging.MultiMessage
 
toString() - Method in class com.aoapps.messaging.StringMessage
 

V

valueOf(String) - Static method in enum com.aoapps.messaging.MessageType
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.aoapps.messaging.MessageType
Returns an array containing the constants of this enum type, in the order they are declared.
A B C D E F G H I M O R S T V 
All Classes and Interfaces|All Packages