A B C D E F G H I J L M N P R S T V W

A

accept(SocketChannel) - Method in interface juglr.net.TCPChannelStrategy
Obtain an actor to handle a TCP connection over a SocketChannel
Actor - Class in juglr
Base class for all actors.
Actor() - Constructor for class juglr.Actor
Create an actor connected to the default message bus
Actor(MessageBus) - Constructor for class juglr.Actor
Create an actor connected to the MessageBus bus
add(Box) - Method in class juglr.Box
Add a child Box to a Box of LIST type.
add(long) - Method in class juglr.Box
Add a child to a Box of LIST type.
add(double) - Method in class juglr.Box
Add a child to a Box of LIST type.
add(boolean) - Method in class juglr.Box
Add a child to a Box of LIST type.
add(String) - Method in class juglr.Box
Add a child Box to a Box of LIST type.
add(List<Box>) - Method in class juglr.Box
Add a child Box to a Box of LIST type.
add(Map<String, Box>) - Method in class juglr.Box
Add a child Box to a Box of LIST type.
addAll(Collection<Box>) - Method in class juglr.Box
Add a collection of child boxes to a box of LIST type.
Address - Class in juglr
Encapsulation of an address on the message bus.
Address() - Constructor for class juglr.Address
 
AddressAlreadyOwnedException - Exception in juglr
Thrown when trying to allocate an address that is already owned by another actor on the bus.
AddressAlreadyOwnedException(String) - Constructor for exception juglr.AddressAlreadyOwnedException
 
allocateNamedAddress(Actor, String) - Method in class juglr.MessageBus
Assign a named address to actor.
allocateUniqueAddress(Actor) - Method in class juglr.MessageBus
 
asString() - Method in class juglr.BoxReader
Read the entire message an return it as a string
asString() - Method in class juglr.JSonBoxReader
 
await(Callable<T>) - Method in class juglr.Actor
Do a blocking call and return its value.
awaitTimeout(long) - Method in class juglr.Actor
Sleep for millis milliseconds and resume operation.

B

Box - Class in juglr
Recommended Message class for general purpose messaging.
Box(Box.Type) - Constructor for class juglr.Box
Create a Box to hold a value of type type
Box(long) - Constructor for class juglr.Box
Create a Box to hold a long
Box(double) - Constructor for class juglr.Box
Create a Box to hold a double
Box(boolean) - Constructor for class juglr.Box
Create a Box to hold a boolean
Box(String) - Constructor for class juglr.Box
Create a Box to hold a String
Box(List<Box>) - Constructor for class juglr.Box
Create a Box to hold a list of boxes
Box(Map<String, Box>) - Constructor for class juglr.Box
Create a Box to hold a map of string keys to Box values
Box.Type - Enum in juglr
The allowed types for box values
Box.TypeException - Exception in juglr
Thrown when invoking methods on a box of a type that does not admit the invoked method
Box.TypeException(String) - Constructor for exception juglr.Box.TypeException
 
BoxParser - Interface in juglr
Interface for parsers cabable of parsing Box objects from character streams.
BoxReader - Class in juglr
A Reader class that outputs a box message as a character stream.
BoxReader(Box) - Constructor for class juglr.BoxReader
 
BoxWriter - Interface in juglr
FIXME: Missing class docs for juglr.BoxWriter
buf - Variable in class juglr.net.HTTPReader
 
buf - Variable in class juglr.net.HTTPWriter
 

C

channel - Variable in class juglr.net.HTTPReader
 
channel - Variable in class juglr.net.HTTPWriter
 
channel - Variable in class juglr.net.TCPChannelActor
The channel to handle
checkType(Box.Type) - Method in class juglr.Box
Assert that this Box is of type t and throw a Box.TypeException if it is not.
checkType(Box, Box.Type) - Static method in class juglr.Box
Assert that the Box m is of type t and throw a Box.TypeException if it is not.
close() - Method in class juglr.JSonBoxReader
 
close() - Method in class juglr.net.HTTPReader
Close the underlying channel if it's open
close() - Method in class juglr.net.HTTPWriter
 

D

DelegatingActor - Class in juglr
Asynchronously forward messages to a delegate according to a given strategy.
DelegatingActor(Address...) - Constructor for class juglr.DelegatingActor
Create a new DelegatingActor forwarding messages to delegates using a round-robin strategy
DelegatingActor(Iterable<Address>) - Constructor for class juglr.DelegatingActor
Create a new DelegatingActor forwarding messages to delegates using a round-robin strategy
DelegatingActor(Actor...) - Constructor for class juglr.DelegatingActor
 
DelegatingActor(DelegatingActor.Strategy) - Constructor for class juglr.DelegatingActor
Create a new DelegatingActor forwarding messages to delegates selected using the given DelegatingActor.Strategy.
DelegatingActor.Strategy - Interface in juglr
 

E

EnvironmentError - Error in juglr
Fatal error for the Juglr runtime.
EnvironmentError(String) - Constructor for error juglr.EnvironmentError
 
EnvironmentError(String, Throwable) - Constructor for error juglr.EnvironmentError
 
EnvironmentError(Throwable) - Constructor for error juglr.EnvironmentError
 
equals(Object) - Method in class juglr.Box
 
externalize() - Method in class juglr.Address
Return a string formatted version of the address, suitable for wire protocols

F

flush() - Method in class juglr.net.HTTPWriter
 
freeAddress(Address) - Method in class juglr.MessageBus
Release a unique- or named address.
fromHttpOrdinal(int) - Static method in enum juglr.net.HTTP.Status
Return a Status instance matching a given numrical HTTP status code.

G

get(int) - Method in class juglr.Box
Get the Box at index from a Box of LIST type.
get(String) - Method in class juglr.Box
Retrieve a child Box with key key from a Box of MAP type.
getAddress() - Method in class juglr.Actor
Get the unique address of this actor assigned by the message bus upon connection time
getBody() - Method in class juglr.net.HTTPRequest
 
getBody() - Method in class juglr.net.HTTPResponse
 
getBoolean() - Method in class juglr.Box
Get the boolean which is contained in this Box of BOOLEAN type
getBoolean(int) - Method in class juglr.Box
 
getBoolean(String) - Method in class juglr.Box
 
getBoolean(String, boolean) - Method in class juglr.Box
 
getBus() - Method in class juglr.Actor
Get the message bus this actor is connected to
getBus() - Method in class juglr.Address
Get the message bus on which this address is valid
getDefault() - Static method in class juglr.MessageBus
Get a reference to the default MessageBus instance for the runtime.
getFloat() - Method in class juglr.Box
Get the double which is contained in this Box of FLOAT type
getFloat(int) - Method in class juglr.Box
 
getFloat(String) - Method in class juglr.Box
 
getFloat(String, double) - Method in class juglr.Box
 
getList() - Method in class juglr.Box
Get the List which is contained in this Box of LIST type
getList(int) - Method in class juglr.Box
 
getList(String) - Method in class juglr.Box
 
getList(String, List<Box>) - Method in class juglr.Box
 
getLong() - Method in class juglr.Box
Get the long which is contained in this Box of INT type
getLong(int) - Method in class juglr.Box
 
getLong(String) - Method in class juglr.Box
 
getLong(String, long) - Method in class juglr.Box
 
getMap() - Method in class juglr.Box
Get the Map which is contained in this Box of MAP type
getMap(int) - Method in class juglr.Box
 
getMap(String) - Method in class juglr.Box
 
getMap(String, Map<String, Box>) - Method in class juglr.Box
 
getMethod() - Method in class juglr.net.HTTPRequest
 
getReplyTo() - Method in class juglr.Message
Get the address the message recipient should reply to in case that is relevant.
getSender() - Method in class juglr.Message
Get the Address of the Actor responsible for sending this message.
getStatus() - Method in class juglr.net.HTTPResponse
 
getString() - Method in class juglr.Box
Get the String which is contained in this Box of STRING type
getString(int) - Method in class juglr.Box
 
getString(String) - Method in class juglr.Box
 
getString(String, String) - Method in class juglr.Box
 
getType() - Method in class juglr.Box
Get the type of the value stored in the box
getType(int) - Method in class juglr.Box
Get the value type of the box stored at position index of this list type box.
getType(String) - Method in class juglr.Box
Get the value type of the box stored with key key of this map type box.
getUri() - Method in class juglr.net.HTTPRequest
 
getVal() - Method in class juglr.Box
Get the raw value contained in this box

H

has(String) - Method in class juglr.Box
Check if this box of map type has a child for the key key
has(int) - Method in class juglr.Box
Return true if index is within the range of the list contained in this box of LIST type
HTTP - Class in juglr.net
Constants used for the HTTP implementation
HTTP() - Constructor for class juglr.net.HTTP
 
HTTP.Method - Enum in juglr.net
Enumeration of HTTP methods
HTTP.Status - Enum in juglr.net
HTTP Status Codes - see RFC 2616.
HTTP.UnsupportedStatusException - Exception in juglr.net
 
HTTP.UnsupportedStatusException(int, int, int) - Constructor for exception juglr.net.HTTP.UnsupportedStatusException
 
HTTP.Version - Enum in juglr.net
HTTP protocol version
httpOrdinal() - Method in enum juglr.net.HTTP.Status
Return the numrical HTTP status code for a Status instance.
HTTPReader - Class in juglr.net
base class for HTTPRequestReader and HTTPResponseReader
HTTPReader(SocketChannel, ByteBuffer) - Constructor for class juglr.net.HTTPReader
 
HTTPRequest - Class in juglr.net
Send by a HTTPServer to one of its bottom half actors according to the rules created via HTTPServer.registerHandler(java.lang.String, juglr.Address, juglr.net.HTTP.Method...).
HTTPRequest(CharSequence, HTTP.Method, Box) - Constructor for class juglr.net.HTTPRequest
 
HTTPRequestReader - Class in juglr.net
A Reader-like API for parsing HTTP requests from a SocketChannel.
HTTPRequestReader(SocketChannel, ByteBuffer) - Constructor for class juglr.net.HTTPRequestReader
 
HTTPRequestReader(SocketChannel) - Constructor for class juglr.net.HTTPRequestReader
 
HTTPRequestWriter - Class in juglr.net
Writer-like interface for constructing HTTP requests
HTTPRequestWriter(SocketChannel, ByteBuffer) - Constructor for class juglr.net.HTTPRequestWriter
 
HTTPRequestWriter(SocketChannel) - Constructor for class juglr.net.HTTPRequestWriter
 
HTTPResponse - Class in juglr.net
Send as a reply to a HTTPRequest.
HTTPResponse(HTTP.Status, Box) - Constructor for class juglr.net.HTTPResponse
 
HTTPResponseReader - Class in juglr.net
 
HTTPResponseReader(SocketChannel, ByteBuffer) - Constructor for class juglr.net.HTTPResponseReader
 
HTTPResponseReader(SocketChannel) - Constructor for class juglr.net.HTTPResponseReader
 
HTTPResponseWriter - Class in juglr.net
A Writer-like class for writing HTTP responses to a SocketChannel.This class does not automatically respect the HTTP protocol and you must manually call the the write*-methods in the correct order to build a valid HTTP response.
HTTPResponseWriter(SocketChannel, ByteBuffer) - Constructor for class juglr.net.HTTPResponseWriter
 
HTTPResponseWriter(SocketChannel) - Constructor for class juglr.net.HTTPResponseWriter
 
HTTPServer - Class in juglr.net
A generic light weight HTTP server handling requests by forwarding them to a set of actors and sending the reponse from the actor back to the client.
HTTPServer(int) - Constructor for class juglr.net.HTTPServer
Create a new HTTP server listening on port port.
HTTPServer(int, MessageBus) - Constructor for class juglr.net.HTTPServer
Create a new HTTP server listening on port port.
HTTPWriter - Class in juglr.net
Base class for HTTPResponseWriter and HTTPRequestWriter

I

IllegalAddressException - Exception in juglr
Throw when trying to allocate a named address on the bus is not legal according to the bus naming rules.
IllegalAddressException(String) - Constructor for exception juglr.IllegalAddressException
 

J

JSonBoxParser - Class in juglr
Helper class for parsing strings, readers, or files into Box instanses.
JSonBoxParser() - Constructor for class juglr.JSonBoxParser
 
JSonBoxReader - Class in juglr
Serialize a Message object to JSON.
JSonBoxReader(Box) - Constructor for class juglr.JSonBoxReader
 
JSonBoxWriter - Class in juglr
FIXME: Missing class docs for juglr.JSonBoxWriter
JSonBoxWriter() - Constructor for class juglr.JSonBoxWriter
 
juglr - package juglr
 
juglr.net - package juglr.net
 

L

list() - Method in class juglr.MessageBus
Iterate through all unique- and named addresses on the bus
lookup(String) - Method in class juglr.MessageBus
Look up an Address for given string.

M

main(String[]) - Static method in class juglr.MessageBus
 
MAX_HEADER_LENGTH - Static variable in class juglr.net.HTTPReader
 
MAX_URI_LENGTH - Static variable in class juglr.net.HTTPRequestReader
 
Message - Class in juglr
Abstract base class for all message types.
Message() - Constructor for class juglr.Message
 
MessageBus - Class in juglr
Central message hub all actors are connected to.
MessageBus() - Constructor for class juglr.MessageBus
Create a new, empty, MessageBus.
MessageFormatException - Exception in juglr
Generic exception raised when someone is trying to parse a Message from a stream that contains syntax errors.
MessageFormatException(String) - Constructor for exception juglr.MessageFormatException
 
MessageFormatException(String, Throwable) - Constructor for exception juglr.MessageFormatException
 
msg - Variable in class juglr.BoxReader
The message being serialized.
MulticastActor - Class in juglr
Asynchronously forward incoming messages to a collection of delegates based on a given strategy.
MulticastActor(Address...) - Constructor for class juglr.MulticastActor
Create a new multicast actor forwarding all incoming messages to all members of delegates.
MulticastActor(Iterable<Address>) - Constructor for class juglr.MulticastActor
Create a new multicast actor forwarding all incoming messages to all members of delegates.
MulticastActor(MulticastActor.Strategy) - Constructor for class juglr.MulticastActor
Create a new multicast actor forwarding all incoming messages to all delegates determined by a given MulticastActor.Strategy.
MulticastActor(Actor...) - Constructor for class juglr.MulticastActor
 
MulticastActor.Strategy - Interface in juglr
Used by MulticastActor to determine which addresses to relay a given message to

N

newForActors(Iterable<Actor>) - Static method in class juglr.DelegatingActor
 
newForActors(Actor...) - Static method in class juglr.DelegatingActor
 
newForActors(Iterable<Actor>) - Static method in class juglr.MulticastActor
 
newForActors(Actor...) - Static method in class juglr.MulticastActor
 
newList() - Static method in class juglr.Box
Create a Box that holds an empty list
newMap() - Static method in class juglr.Box
Create a Box that holds an empty map of string keys to Box values

P

parse(String) - Method in interface juglr.BoxParser
 
parse(Reader) - Method in interface juglr.BoxParser
 
parse(File) - Method in interface juglr.BoxParser
 
parse(InputStream) - Method in interface juglr.BoxParser
 
parse(String) - Method in class juglr.JSonBoxParser
 
parse(Reader) - Method in class juglr.JSonBoxParser
 
parse(File) - Method in class juglr.JSonBoxParser
 
parse(InputStream) - Method in class juglr.JSonBoxParser
 
put(String, Box) - Method in class juglr.Box
Associate a key String with a child Box inside a Box of LIST type.
put(String, long) - Method in class juglr.Box
Associate a value with key in box of MAP type.
put(String, double) - Method in class juglr.Box
Associate a value with key in box of MAP type.
put(String, boolean) - Method in class juglr.Box
Associate a value with key in box of MAP type.
put(String, String) - Method in class juglr.Box
Associate a value with key in box of MAP type.
put(String, List<Box>) - Method in class juglr.Box
Associate a value with key in box of MAP type.
put(String, Map<String, Box>) - Method in class juglr.Box
Associate a value with key in box of MAP type.
putAll(Map<String, Box>) - Method in class juglr.Box
Import all key-value pairs from map into this Box (which must be of the MAP type).

R

react(Message) - Method in class juglr.Actor
Primary method for handling incoming messages, override it with your message handling logic.
react(Message) - Method in class juglr.DelegatingActor
Asynchronously relay the incoming message to the address determined by calling DelegatingActor.Strategy.recipient(Message).
react(Message) - Method in class juglr.MulticastActor
Asynchronously send msg to all addresses determined by calling MulticastActor.Strategy.recipients(juglr.Message).
react(Message) - Method in class juglr.net.TCPServerActor
 
read(char[], int, int) - Method in class juglr.JSonBoxReader
 
read() - Method in class juglr.JSonBoxReader
 
readBody(byte[]) - Method in class juglr.net.HTTPReader
 
readBody(byte[], int, int) - Method in class juglr.net.HTTPReader
 
readHeaderField(byte[]) - Method in class juglr.net.HTTPReader
Read a HTTP header line (termincated by \r\n)
readLF() - Method in class juglr.net.HTTPReader
Read the next byte and and check if it is a carriage return - if it is then read the second byte and check if it's a newline - and if both bytes are good return true.
readMethod() - Method in class juglr.net.HTTPRequestReader
 
readSpace() - Method in class juglr.net.HTTPReader
Read the next byte and return true if it is a white space
readStatus() - Method in class juglr.net.HTTPReader
Read a numeric HTTP status code and return it as a HTTP.Status
readStatus() - Method in class juglr.net.HTTPResponseReader
 
readURI(byte[]) - Method in class juglr.net.HTTPRequestReader
 
readVersion() - Method in class juglr.net.HTTPReader
Parse a HTTP protocol version declaration as used in the HTTP protocol.
readVersion() - Method in class juglr.net.HTTPRequestReader
 
readVersion() - Method in class juglr.net.HTTPResponseReader
 
recipient(Message) - Method in interface juglr.DelegatingActor.Strategy
Select the recipient for msg
recipients(Message) - Method in interface juglr.MulticastActor.Strategy
Get an iterator over the recipients of msg
registerHandler(String, Address, HTTP.Method...) - Method in class juglr.net.HTTPServer
Configure all requests with URLs matching pathRegex to be handled by the actor living at the handler address.
reset(Box) - Method in class juglr.BoxReader
Prepare the reader for serializing another message.
reset(Box) - Method in class juglr.JSonBoxReader
 
reset(SocketChannel) - Method in class juglr.net.HTTPReader
Reset all state in the reader, preparing it for reading channel.
reset(SocketChannel) - Method in class juglr.net.HTTPRequestReader
 
reset(SocketChannel) - Method in class juglr.net.HTTPRequestWriter
Clear all state and reset the writer to start writing a new response tp channel.
reset(SocketChannel) - Method in class juglr.net.HTTPResponseReader
 
reset(SocketChannel) - Method in class juglr.net.HTTPResponseWriter
Clear all state and reset the writer to start writing a new response tp channel.

S

send(Message, Address) - Method in class juglr.Actor
Send a message to another actor.
send(Message, Address) - Method in class juglr.MessageBus
Asynchronously send msg to recipient.
setReplyTo(Address) - Method in class juglr.Message
Set the address that the message recipient should reply to in case that is relevant.
SHUTDOWN - Static variable in class juglr.net.TCPServerActor
 
size() - Method in class juglr.Box
Return the number of immediate child StructuredMessages of this Box
start() - Method in class juglr.Actor
Initiate the actor life cycle, you may start sending messages from within this method.
start() - Method in class juglr.DelegatingActor
Invoke DelegatingActor.Strategy.start()
start() - Method in interface juglr.DelegatingActor.Strategy
Make sure actors in this strategy have their Actor.start() methods invoked.
start(Address) - Method in class juglr.MessageBus
Asynchronously invoke the Actor.start() on the recipient actor
start() - Method in class juglr.MulticastActor
Invoke MulticastActor.Strategy.start()
start() - Method in interface juglr.MulticastActor.Strategy
Make sure that all actors related to this strategy have their Actor.start() method invoked.
start() - Method in class juglr.net.HTTPServer
Start listening on the configured port.
start() - Method in class juglr.net.TCPServerActor
 
startBody() - Method in class juglr.net.HTTPWriter
 
strategy - Variable in class juglr.DelegatingActor
 
strategy - Variable in class juglr.MulticastActor
 
streamBody() - Method in class juglr.net.HTTPReader
Read the message body as a stream, starting from the current position.

T

TCPChannelActor - Class in juglr.net
An Actor handling a TCP connection via a SocketChannel.
TCPChannelActor(SocketChannel) - Constructor for class juglr.net.TCPChannelActor
 
TCPChannelStrategy - Interface in juglr.net
Strategy for choosing TCPChannelActors from a TCPServerActor for handling incoming TCP connections.
TCPServerActor - Class in juglr.net
A TCP server that accepts connections in a designated thread and dispatches control to a TCPChannelActor obtained from a TCPChannelStrategy.
TCPServerActor(SocketAddress, TCPChannelStrategy, MessageBus) - Constructor for class juglr.net.TCPServerActor
 
TCPServerActor(int, TCPChannelStrategy) - Constructor for class juglr.net.TCPServerActor
Create a server listening on port handling connection with actor obtained from strategy
TCPServerActor(String, int, TCPChannelStrategy) - Constructor for class juglr.net.TCPServerActor
 
TCPServerActor(int, TCPChannelStrategy, MessageBus) - Constructor for class juglr.net.TCPServerActor
 
TCPServerActor(String, int, TCPChannelStrategy, MessageBus) - Constructor for class juglr.net.TCPServerActor
 
toBytes() - Method in class juglr.Box
Return a newly allocated byte array containing this box as JSON encoded in the default system encoding.
toString() - Method in class juglr.Actor
Returns the externalized form of this actor's Address
toString() - Method in class juglr.Address
 
toString() - Method in class juglr.Box
String format the value contained in this box

V

validate(Message) - Method in class juglr.DelegatingActor
If this method returns false msg will not be sent along to the delegates.
validate(Message) - Method in class juglr.MulticastActor
If this method returns false msg will not be sent along to the delegates.
valueOf(String) - Static method in enum juglr.Box.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum juglr.net.HTTP.Method
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum juglr.net.HTTP.Status
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum juglr.net.HTTP.Version
Returns the enum constant of this type with the specified name.
values() - Static method in enum juglr.Box.Type
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum juglr.net.HTTP.Method
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum juglr.net.HTTP.Status
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum juglr.net.HTTP.Version
Returns an array containing the constants of this enum type, in the order they are declared.

W

write(Box, Appendable) - Method in interface juglr.BoxWriter
 
write(Box, Appendable) - Method in class juglr.JSonBoxWriter
 
writeBody(CharSequence) - Method in class juglr.net.HTTPWriter
 
writeBody(byte[]) - Method in class juglr.net.HTTPWriter
 
writeBody(byte) - Method in class juglr.net.HTTPWriter
 
writeBody(byte[], int, int) - Method in class juglr.net.HTTPWriter
 
writeHeader(String, String) - Method in class juglr.net.HTTPWriter
 
writeLF() - Method in class juglr.net.HTTPWriter
 
writeMethod(HTTP.Method) - Method in class juglr.net.HTTPRequestWriter
 
writeSpace() - Method in class juglr.net.HTTPWriter
 
writeStatus(HTTP.Status) - Method in class juglr.net.HTTPResponseWriter
 
writeUri(CharSequence) - Method in class juglr.net.HTTPRequestWriter
 
writeVersion(HTTP.Version) - Method in class juglr.net.HTTPRequestWriter
 
writeVersion(HTTP.Version) - Method in class juglr.net.HTTPResponseWriter
 
writeVersion(HTTP.Version) - Method in class juglr.net.HTTPWriter
 

A B C D E F G H I J L M N P R S T V W