A B C D E F G H I K L M N O P Q R S T

A

active - Variable in class org.miv.mbox.net.Receiver.IncomingBuffer
When false the socket is closed and this buffer must be removed from the active connections.
addListener(MBoxListener) - Method in class org.miv.mbox.MBoxStandalone
Add a listener for this message box.

B

beg - Variable in class org.miv.mbox.net.Receiver.IncomingBuffer
Index in the buffer of the first byte that forms the currents message.
boxes - Variable in class org.miv.mbox.net.Receiver
Pairs (key,value) where the key is the listener ID and the value the MBox of the listener.
buf - Variable in class org.miv.mbox.net.Receiver.IncomingBuffer
Buffer for reading.
BUFFER_INITIAL_SIZE - Static variable in class org.miv.mbox.net.Receiver.IncomingBuffer
 
bufferize(int, SocketChannel) - Method in class org.miv.mbox.net.Receiver.IncomingBuffer
Read more data from the socket and put it in the buffer at at.
byteArrayOut - Variable in class org.miv.mbox.net.Sender
Byte output stream.

C

CannotPostException - Exception in org.miv.mbox
Raised when a message cannot be posted for any reason
CannotPostException(String) - Constructor for exception org.miv.mbox.CannotPostException
New post exception.
changeBuffer(byte[]) - Method in class org.miv.mbox.net.PositionableByteArrayInputStream
 
compactBuffer() - Method in class org.miv.mbox.net.Receiver.IncomingBuffer
Compact the buffer by removing all read data before beg.
connect(String, int) - Method in class org.miv.mbox.net.SenderPool
Create a new sender to "//hostname:port" and cache it.
connect(MBoxLocator) - Method in class org.miv.mbox.net.SenderPool
Create a new sender for the host part of the given locator and cache it.

D

data - Variable in class org.miv.mbox.MBoxBase.Message
 
data - Variable in class org.miv.mbox.net.Packet
Data of the message.
debug - Variable in class org.miv.mbox.net.Receiver
Show debugging messages.
debug(String, Object...) - Method in class org.miv.mbox.net.Receiver
 
debug - Variable in class org.miv.mbox.net.Sender
Echo debugging messages?.
debug(String, Object...) - Method in class org.miv.mbox.net.Sender
 
debug - Variable in class org.miv.mbox.net.SenderPool
 
decodeMessage(int) - Method in class org.miv.mbox.net.Receiver.IncomingBuffer
Decode one message.

E

end - Variable in class org.miv.mbox.net.Receiver.IncomingBuffer
Index in the buffer past the last byte that forms the current message.
enlargeBuffer() - Method in class org.miv.mbox.net.Receiver.IncomingBuffer
Not used in the current implementation, we assumes that no message will be larger than the size of the buffer.
error(String, Object...) - Method in class org.miv.mbox.net.Receiver
 
error(Throwable, String, Object...) - Method in class org.miv.mbox.net.Receiver
 

F

from - Variable in class org.miv.mbox.MBoxBase.Message
 
from - Variable in class org.miv.mbox.net.Packet
Name of the sender.

G

getData() - Method in class org.miv.mbox.MBoxBase.Message
 
getFrom() - Method in class org.miv.mbox.MBoxBase.Message
 
getFrom() - Method in class org.miv.mbox.net.Packet
Sender of the message.
getHostId() - Method in class org.miv.mbox.net.MBoxLocator
String containing only the hostname and port under the form "//hostname:port".
getHostname() - Method in class org.miv.mbox.net.MBoxLocator
Host name part.
getLocator() - Method in class org.miv.mbox.net.Receiver
Locator of this receiver.
getLocator() - Method in class org.miv.mbox.net.Sender
Locator of the distant receiver.
getMBox(String) - Method in class org.miv.mbox.net.Receiver
Message box attached to the given message box name, or null if no MBox is registered at this name.
getMessage() - Method in class org.miv.mbox.net.Packet
Message object.
getMessageCount() - Method in class org.miv.mbox.MBoxBase
 
getName() - Method in class org.miv.mbox.net.MBoxLocator
Name of this locator.
getPort() - Method in class org.miv.mbox.net.MBoxLocator
Port of this locator.
getPos() - Method in class org.miv.mbox.net.PositionableByteArrayInputStream
 
getSender(MBoxLocator) - Method in class org.miv.mbox.net.SenderPool
Get the sender for the host given by the given locator.
getSender(String, int) - Method in class org.miv.mbox.net.SenderPool
Get the sender for the host given by the given hostname and port.
getTo() - Method in class org.miv.mbox.net.Packet
Receiver of the message.

H

hasSender(MBoxLocator) - Method in class org.miv.mbox.net.SenderPool
Is there a cached connection to the hostname and port of the given locator.
header - Variable in class org.miv.mbox.net.Sender
Oh?!.
hostId - Variable in class org.miv.mbox.net.MBoxLocator
Computed host id (Host and port without the name) to avoid recreating it.
hostname - Variable in class org.miv.mbox.net.MBoxLocator
Host name of the URL.

I

IdAlreadyInUseException - Exception in org.miv.mbox.net
 
IdAlreadyInUseException(String) - Constructor for exception org.miv.mbox.net.IdAlreadyInUseException
 
incoming - Variable in class org.miv.mbox.net.Receiver
Current active incoming connections.
init() - Method in class org.miv.mbox.net.Receiver
Initialise the server socket.
isMBoxEmpty() - Method in class org.miv.mbox.MBoxBase
 
isRunning() - Method in class org.miv.mbox.net.Receiver
False as soon as the receiver terminates.

K

key - Variable in class org.miv.mbox.net.Receiver
Key for the selector.

L

lastError - Variable in class org.miv.mbox.net.Receiver
Last encountered error.
LIGHT_GREEN - Static variable in class org.miv.mbox.net.Sender
 
LIGHT_YELLOW - Static variable in class org.miv.mbox.net.Receiver
 
listeners - Variable in class org.miv.mbox.MBoxStandalone
Listener for this message box.
locator - Variable in class org.miv.mbox.net.Receiver
Host name for this application.
locator - Variable in class org.miv.mbox.net.Sender
Locator of the distant message box.
loop - Variable in class org.miv.mbox.net.Receiver
While true, the received is running.

M

main(String[]) - Static method in class org.miv.mbox.Test
 
MBox - Interface in org.miv.mbox
Container for incoming messages.
MBoxBase - Class in org.miv.mbox
MBox default implementation usable as base class.
MBoxBase() - Constructor for class org.miv.mbox.MBoxBase
New empty Message Box.
MBoxBase.Message - Class in org.miv.mbox
Simple message container.
MBoxBase.Message(String, Object[]) - Constructor for class org.miv.mbox.MBoxBase.Message
 
MBoxListener - Interface in org.miv.mbox
Message box listener.
MBoxLocator - Class in org.miv.mbox.net
Address of a message box.
MBoxLocator(String, int) - Constructor for class org.miv.mbox.net.MBoxLocator
New locator according to the host name and port only.
MBoxLocator(String, int, String) - Constructor for class org.miv.mbox.net.MBoxLocator
New locator according to the host name, port and message box name.
MBoxLocator(String) - Constructor for class org.miv.mbox.net.MBoxLocator
New locator created by cutting the given string into fields.
MBoxStandalone - Class in org.miv.mbox
Implementation of a message box to be used without having to inherit it.
MBoxStandalone(MBoxListener) - Constructor for class org.miv.mbox.MBoxStandalone
New empty message box dispatching messages to a given listener.
MBoxStandalone() - Constructor for class org.miv.mbox.MBoxStandalone
New empty message box.
messages - Variable in class org.miv.mbox.MBoxBase
List of unread messages.
mtmp - Variable in class org.miv.mbox.MBoxBase
Temporary array to store messages when sent to the listener to avoid blocking the Receiver that can post messages during the execution of messages.

N

name - Variable in class org.miv.mbox.net.MBoxLocator
Identifier part of the URL.
notifyOnPost - Variable in class org.miv.mbox.MBoxStandalone
Notify every threads waiting on this mbox monitor at each post?.
notifyOnPost() - Method in class org.miv.mbox.MBoxStandalone
Does the MBoxStandalone.post(String,Object...) method must notify any thread waiting on the monitor of this message box?.

O

objectOut - Variable in class org.miv.mbox.net.Sender
Object output stream.
org.miv.mbox - package org.miv.mbox
 
org.miv.mbox.net - package org.miv.mbox.net
 

P

Packet - Class in org.miv.mbox.net
Packet to encapsulate exchanged objects between senders and receivers.
Packet(String, String, Object[]) - Constructor for class org.miv.mbox.net.Packet
New packet.
poll() - Method in class org.miv.mbox.net.Receiver
Wait until one or several chunks of message are acceptable.
popPendingMessages() - Method in class org.miv.mbox.MBoxBase
Like MBoxBase.processMessages() but instead of calling the MBoxBase.processMessage(String, Object[]) method for each message, returns the list of pending messages.
port - Variable in class org.miv.mbox.net.MBoxLocator
Port of the URL.
pos - Variable in class org.miv.mbox.net.Receiver.IncomingBuffer
Position inside beg and end past the last byte read.
PositionableByteArrayInputStream - Class in org.miv.mbox.net
Descendant of ByteArrayInputStream that allows to change the offset and length.
PositionableByteArrayInputStream(byte[]) - Constructor for class org.miv.mbox.net.PositionableByteArrayInputStream
 
PositionableByteArrayInputStream(byte[], int, int) - Constructor for class org.miv.mbox.net.PositionableByteArrayInputStream
 
post(String, Object...) - Method in interface org.miv.mbox.MBox
Post a message in the message box.
post(String, Object...) - Method in class org.miv.mbox.MBoxBase
 
post(String, Object...) - Method in class org.miv.mbox.MBoxStandalone
 
post(String, Object...) - Method in class org.miv.mbox.net.RemoteMBox
Post a message to the remote message box.
processMessage(String, Object[]) - Method in class org.miv.mbox.MBoxBase
Method to override to process each incomming message.
processMessage(String, Object[]) - Method in interface org.miv.mbox.MBoxListener
A message has been received.
processMessage(String, Object[]) - Method in class org.miv.mbox.MBoxStandalone
 
processMessages() - Method in class org.miv.mbox.MBoxBase
Process all messages.

Q

quit() - Method in class org.miv.mbox.net.Receiver
Stop the receiver.

R

readDataChunk(SelectionKey) - Method in class org.miv.mbox.net.Receiver.IncomingBuffer
Read the available bytes and buffers them.
readDataChunk(SelectionKey) - Method in class org.miv.mbox.net.Receiver
When data is readable on a socket, send it to the appropriate buffer (creating it if needed).
Receiver - Class in org.miv.mbox.net
Receives messages and dispatches them to message boxes.
Receiver(MBoxLocator) - Constructor for class org.miv.mbox.net.Receiver
New receiver, awaiting for messages in its own thread at the given locator.
Receiver(MBoxLocator, boolean) - Constructor for class org.miv.mbox.net.Receiver
New receiver, awaiting for messages in its own thread at the given locator.
Receiver(String, int) - Constructor for class org.miv.mbox.net.Receiver
Like Receiver.Receiver(MBoxLocator) but specify the host name and port explicitly.
Receiver(String, int, boolean) - Constructor for class org.miv.mbox.net.Receiver
Like Receiver.Receiver(MBoxLocator,boolean) but specify the host name and port explicitly.
Receiver.IncomingBuffer - Class in org.miv.mbox.net
The connection to a sender.
Receiver.IncomingBuffer() - Constructor for class org.miv.mbox.net.Receiver.IncomingBuffer
 
register(String, MBoxListener) - Method in class org.miv.mbox.net.Receiver
Register a message box listener for incoming messages.
register(String, MBox) - Method in class org.miv.mbox.net.Receiver
Register a message box.
RemoteMBox - Class in org.miv.mbox.net
Representation of a remove message box.
RemoteMBox(Sender, String) - Constructor for class org.miv.mbox.net.RemoteMBox
New remote message box.
remoteMBoxName - Variable in class org.miv.mbox.net.RemoteMBox
Name of the remote message box.
removeListener(MBoxListener) - Method in class org.miv.mbox.MBoxStandalone
Remove a listener.
RESET - Static variable in class org.miv.mbox.net.Receiver
 
reset - Variable in class org.miv.mbox.net.Sender
Ah?!.
RESET - Static variable in class org.miv.mbox.net.Sender
 
run() - Method in class org.miv.mbox.net.Receiver
Wait for connections, accept them, demultiplexes them and dispatch messages to registered message boxes.

S

selector - Variable in class org.miv.mbox.net.Receiver
Multiplexor.
send(String, String, Object...) - Method in class org.miv.mbox.net.Sender
Send a message.
send(Packet) - Method in class org.miv.mbox.net.Sender
Send a data packet.
send(String, String, int, String, Object...) - Method in class org.miv.mbox.net.SenderPool
Send a message to a distant message box, first creating a sender if not already cached.
send(String, MBoxLocator, Object...) - Method in class org.miv.mbox.net.SenderPool
Send a message to a distant message box, first creating a sender if not already cached.
send(MBoxLocator, Packet) - Method in class org.miv.mbox.net.SenderPool
Send a prepacked message to a distant message box, first creating a sender if not already cached.
sender - Variable in class org.miv.mbox.net.RemoteMBox
The sender.
Sender - Class in org.miv.mbox.net
Sends messages to message boxes.
Sender(MBoxLocator) - Constructor for class org.miv.mbox.net.Sender
New sender toward the given receiver.
Sender(MBoxLocator, boolean) - Constructor for class org.miv.mbox.net.Sender
New sender toward the given receiver.
SenderPool - Class in org.miv.mbox.net
Create and cache senders automatically.
SenderPool() - Constructor for class org.miv.mbox.net.SenderPool
Empty sender pool.
SenderPool(boolean) - Constructor for class org.miv.mbox.net.SenderPool
Empty sender pool.
senders - Variable in class org.miv.mbox.net.SenderPool
Map of senders.
server - Variable in class org.miv.mbox.net.Receiver
Receiver socket.
setDebugOn(boolean) - Method in class org.miv.mbox.net.Receiver
Enable or disable debugging.
setDebugOn(boolean) - Method in class org.miv.mbox.net.Sender
Enable or disable debugging.
setHostname(String) - Method in class org.miv.mbox.net.MBoxLocator
Change the host name of this locator.
setListener(MBoxListener) - Method in class org.miv.mbox.MBoxStandalone
Deprecated. 
setName(String) - Method in class org.miv.mbox.net.MBoxLocator
Change the message box name of this locator.
setNotifyOnPost(boolean) - Method in class org.miv.mbox.MBoxStandalone
Specify if each call to MBoxStandalone.post(String, Object...) should notify threads waiting on the monitor of this message box.
setPort(int) - Method in class org.miv.mbox.net.MBoxLocator
Change the port of this locator.
setPos(int, int) - Method in class org.miv.mbox.net.PositionableByteArrayInputStream
 
socket - Variable in class org.miv.mbox.net.Sender
Socket to the receiver.

T

Test - Class in org.miv.mbox
 
Test() - Constructor for class org.miv.mbox.Test
 
to - Variable in class org.miv.mbox.net.Packet
Name of the receiver.
toString() - Method in class org.miv.mbox.net.MBoxLocator
 
truc() - Method in class org.miv.mbox.Test
 

A B C D E F G H I K L M N O P Q R S T

Copyright © 2011. All Rights Reserved.