- cancel() - Method in interface naga.eventmachine.DelayedEvent
-
Cancels this delayed event.
- cancelKeySilently(SelectionKey) - Static method in class naga.NIOUtils
-
Silently cancel a key.
- ChatServer - Class in naga.examples
-
Creates a very simple chat server.
- CipherPacketReader - Class in naga.packetreader
-
Example filter reader that decrypts the stream before passing it to its underlying reader.
- CipherPacketReader(Cipher, PacketReader) - Constructor for class naga.packetreader.CipherPacketReader
-
Creates a new CipherPacketReader.
- CipherPacketWriter - Class in naga.packetwriter
-
Example Writer that encrypts the outgoing stream using a Cipher object.
- CipherPacketWriter(Cipher, PacketWriter) - Constructor for class naga.packetwriter.CipherPacketWriter
-
- close() - Method in interface naga.NIOAbstractSocket
-
Closes this socket (the actual disconnect will occur on the NIOService thread)
- close() - Method in class naga.NIOService
-
Close the entire service.
- closeAfterWrite() - Method in interface naga.NIOSocket
-
Causes the socket to close after writing the current entries in the queue
(consequent entries will be thrown away).
- closeChannelSilently(Channel) - Static method in class naga.NIOUtils
-
Silently close a channel.
- closeEngine() - Method in class naga.SSLPacketHandler
-
- closeKeyAndChannelSilently(SelectionKey, Channel) - Static method in class naga.NIOUtils
-
Silently close both a key and a channel.
- compact(ByteBuffer[]) - Static method in class naga.NIOUtils
-
Compacts an array of byte buffers, retaining only the buffers that have remaining data.
- concat(ByteBuffer[], ByteBuffer) - Static method in class naga.NIOUtils
-
- concat(ByteBuffer[], ByteBuffer[]) - Static method in class naga.NIOUtils
-
- concat(ByteBuffer, ByteBuffer[]) - Static method in class naga.NIOUtils
-
- ConnectionAcceptor - Interface in naga
-
The ConnectionAcceptor is used by the NIOServerSocket to determine
if a connection should be accepted or refused.
- connectionBroken(NIOSocket, Exception) - Method in interface naga.SocketObserver
-
Called by the NIOService on the NIO thread when a connection is disconnected.
- connectionBroken(NIOSocket, Exception) - Method in class naga.SocketObserverAdapter
-
- connectionOpened(NIOSocket) - Method in interface naga.SocketObserver
-
Called by the NIOService on the NIO thread when a connection completes on a socket.
- connectionOpened(NIOSocket) - Method in class naga.SocketObserverAdapter
-
- copy(ByteBuffer) - Static method in class naga.NIOUtils
-
- getAddress() - Method in interface naga.NIOAbstractSocket
-
Returns the InetSocketAddress for this socket.
- getBufferSize() - Method in class naga.NIOService
-
Returns the new shared buffer size.
- getBytesRead() - Method in interface naga.NIOSocket
-
Return the total number of bytes read on this socket since
it was opened.
- getBytesWritten() - Method in interface naga.NIOSocket
-
Return the total number of bytes written on this socket
since it was opened.
- getCall() - Method in interface naga.eventmachine.DelayedEvent
-
Returns the actual Runnable to be executed when this event runs.
- getEventMachine() - Method in class naga.examples.ChatServer
-
- getIp() - Method in interface naga.NIOAbstractSocket
-
Reports the IP used by this socket.
- getMaxPacketSize() - Method in class naga.packetreader.DelimiterPacketReader
-
Get the current maximum buffer size.
- getMaxQueueSize() - Method in interface naga.NIOSocket
-
The current maximum queue size in bytes.
- getNIOService() - Method in class naga.eventmachine.EventMachine
-
Returns the NIOService used by this event service.
- getPacketSizeFromByteArray(byte[], int, boolean) - Static method in class naga.NIOUtils
-
Converts a value in a header byte array encoded in either big or little endian
encoding.
- getPacketSizeFromByteBuffer(ByteBuffer, int, boolean) - Static method in class naga.NIOUtils
-
Converts a value in a header buffer encoded in either big or little endian
encoding.
- getPacketWriter() - Method in class naga.packetwriter.CipherPacketWriter
-
- getPort() - Method in interface naga.NIOAbstractSocket
-
Returns the port in use by this socket.
- getQueue() - Method in class naga.eventmachine.EventMachine
-
Return the current event service queue.
- getQueue() - Method in class naga.NIOService
-
Returns a copy of the internal event queue.
- getQueueSize() - Method in class naga.eventmachine.EventMachine
-
Return the current queue size.
- getReader() - Method in class naga.packetreader.CipherPacketReader
-
- getReader() - Method in class naga.SSLPacketHandler
-
- getSSLContext() - Method in interface naga.NIOServerSocketSSL
-
Returns the SSLContext in use.
- getSSLEngine() - Method in interface naga.NIOSocketSSL
-
Returns the SSLEngine in use for this socket.
- getSSLEngine() - Method in class naga.SSLPacketHandler
-
- getTag() - Method in interface naga.NIOAbstractSocket
-
Returns the tag for this socket.
- getTime() - Method in interface naga.eventmachine.DelayedEvent
-
Returns the time when this event will execute.
- getTimeOpen() - Method in interface naga.NIOSocket
-
Return the time this socket has been open.
- getTotalAcceptedConnections() - Method in interface naga.NIOServerSocket
-
Returns the total number of accepted connections on this socket since
it opened.
- getTotalConnections() - Method in interface naga.NIOServerSocket
-
Returns the total number of connections made on this socket since
it opened.
- getTotalFailedConnections() - Method in interface naga.NIOServerSocket
-
Returns the total number of failed connections on this socket since
it opened.
- getTotalRefusedConnections() - Method in interface naga.NIOServerSocket
-
Returns the total number of refused connections on this socket since
it opened.
- getWriteQueueSize() - Method in interface naga.NIOSocket
-
This method returns the number of bytes queued for dispatch.
- getWriter() - Method in class naga.SSLPacketHandler
-
- naga - package naga
-
The main Naga classes.
- naga.eventmachine - package naga.eventmachine
-
An optional simple service for driving asynchronous and delayed tasks integrated with the Naga NIOService.
- naga.examples - package naga.examples
-
Various examples on how to use Naga.
- naga.exception - package naga.exception
-
Exceptions used by Naga.
- naga.packetreader - package naga.packetreader
-
Package containing various ready-to-use PacketReader
implementations.
- naga.packetwriter - package naga.packetwriter
-
Package containing various ready-to-use PacketWriter
implementations.
- newConnection(NIOSocket) - Method in class naga.examples.ChatServer
-
- newConnection(NIOSocket) - Method in interface naga.ServerSocketObserver
-
Called by the NIOService on the NIO thread when a new connection has been accepted by the socket.
- newConnection(NIOSocket) - Method in class naga.ServerSocketObserverAdapter
-
- nextPacket(ByteBuffer) - Method in class naga.packetreader.CipherPacketReader
-
- nextPacket(ByteBuffer) - Method in class naga.packetreader.DelimiterPacketReader
-
- nextPacket(ByteBuffer) - Method in interface naga.PacketReader
-
Create a new packet using the ByteBuffer given.
- nextPacket(ByteBuffer) - Method in class naga.packetreader.RawPacketReader
-
- nextPacket(ByteBuffer) - Method in class naga.packetreader.RegularPacketReader
-
- nextPacket(ByteBuffer) - Method in class naga.packetreader.StreamCipherPacketReader
-
- nextPacket(ByteBuffer) - Method in class naga.SSLPacketHandler
-
- NIOAbstractSocket - Interface in naga
-
An interface describing methods common to both NIOSocket and NIOServerSocket.
- NIOServerSocket - Interface in naga
-
Interface for the NIOServerSocket, which is
an asynchronous facade to an underlying ServerSocket.
- NIOServerSocketSSL - Interface in naga
-
Interface for SSL Server Sockets
- NIOService - Class in naga
-
This class forms the basis of the NIO handling in Naga.
- NIOService() - Constructor for class naga.NIOService
-
Create a new nio service with default buffer size (64kb)
- NIOService(int) - Constructor for class naga.NIOService
-
Create a new nio service.
- NIOSocket - Interface in naga
-
Interface for the NIOSocket, which is
an asynchronous facade to an underlying Socket.
- NIOSocketSSL - Interface in naga
-
Interface for a SSL Socket
- NIOUtils - Class in naga
-
A collection of utilites used by various classes.
- notifyException(Throwable) - Method in class naga.NIOService
-
Logs an exception using the exception observer.
- notifyExceptionThrown(Throwable) - Method in interface naga.ExceptionObserver
-
Notify the observer that an exception has been thrown.
- NULL - Static variable in interface naga.SocketObserver
-
A null object used as the default observer
- selectBlocking() - Method in class naga.NIOService
-
Run all waiting NIO requests, blocking indefinitely
until at least one request is handled.
- selectBlocking(long) - Method in class naga.NIOService
-
Run all waiting NIO requests, blocking until
at least one request is found, or the method has blocked
for the time given by the timeout value, whatever comes first.
- selectNonBlocking() - Method in class naga.NIOService
-
Run all waiting NIO requests, returning immediately if
no requests are found.
- serverSocketDied(Exception) - Method in class naga.examples.ChatServer
-
- serverSocketDied(Exception) - Method in interface naga.ServerSocketObserver
-
Called by the NIOService on the NIO thread when the server socket is closed.
- serverSocketDied(Exception) - Method in class naga.ServerSocketObserverAdapter
-
- ServerSocketObserver - Interface in naga
-
Implemented by an observer to a server socket.
- ServerSocketObserverAdapter - Class in naga
-
Class with null-implementations for all callbacks.
- ServerSocketObserverAdapter() - Constructor for class naga.ServerSocketObserverAdapter
-
- setBufferSize(int) - Method in class naga.NIOService
-
Set the new shared buffer size.
- setConnectionAcceptor(ConnectionAcceptor) - Method in interface naga.NIOServerSocket
-
Sets the connection acceptor for this server socket.
- setExceptionObserver(ExceptionObserver) - Method in class naga.NIOService
-
Updates the exception observer for the NIOService.
- setHeaderForPacketSize(byte[], int, int, boolean) - Static method in class naga.NIOUtils
-
Inserts a header in the first bytes of a byte array
in either big or little endian encoding (i.e.
- setMaxPacketSize(int) - Method in class naga.packetreader.DelimiterPacketReader
-
Set the new maximum packet size.
- setMaxQueueSize(int) - Method in interface naga.NIOSocket
-
Sets the maximum number of bytes allowed in the queue for this socket.
- setObserver(ExceptionObserver) - Method in class naga.eventmachine.EventMachine
-
Sets the ExceptionObserver for this service.
- setPacketReader(PacketReader) - Method in interface naga.NIOSocket
-
Sets the packet reader for this socket.
- setPacketSizeInByteBuffer(ByteBuffer, int, int, boolean) - Static method in class naga.NIOUtils
-
Encodes a length into byte buffer using
either big or little endian encoding (i.e.
- setPacketWriter(PacketWriter) - Method in interface naga.NIOSocket
-
Sets the packet writer for this socket.
- setPacketWriter(PacketWriter) - Method in class naga.packetwriter.CipherPacketWriter
-
- setReader(PacketReader) - Method in class naga.packetreader.CipherPacketReader
-
- setReader(PacketReader) - Method in class naga.SSLPacketHandler
-
- setTag(Object) - Method in interface naga.NIOAbstractSocket
-
Returns the tag for this socket.
- setWriter(PacketWriter) - Method in class naga.SSLPacketHandler
-
- shutdown() - Method in class naga.eventmachine.EventMachine
-
Stops the event machine and closes the underlying NIO service, it is not possible to
restart the event machine after shutdown.
- SKIP_PACKET - Static variable in interface naga.PacketReader
-
- socket() - Method in interface naga.NIOServerSocket
-
Allows access to the underlying server socket.
- socket() - Method in interface naga.NIOSocket
-
Allows access to the underlying socket.
- SocketObserver - Interface in naga
-
This interface contains the callbacks used by a NIOSocket
to inform its observer of events.
- SocketObserverAdapter - Class in naga
-
Class with null-implementation of all SocketObserver callbacks.
- SocketObserverAdapter() - Constructor for class naga.SocketObserverAdapter
-
- SSLPacketHandler - Class in naga
-
Undocumented Class
- SSLPacketHandler(SSLEngine, NIOSocket, SSLSocketChannelResponder) - Constructor for class naga.SSLPacketHandler
-
- SSLTester - Class in naga.examples
-
Undocumented Class
- SSLTester() - Constructor for class naga.examples.SSLTester
-
- start() - Method in class naga.eventmachine.EventMachine
-
Causes the event machine to start running on a separate thread together with the
NIOService.
- stop() - Method in class naga.eventmachine.EventMachine
-
Stops the event machine thread, it may be restarted using start()
- StreamCipherPacketReader - Class in naga.packetreader
-
Undocumented Class
- StreamCipherPacketReader(Cipher, PacketReader) - Constructor for class naga.packetreader.StreamCipherPacketReader
-