summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
TJ [Wed, 10 Jun 2015 09:18:48 +0000 (10:18 +0100)]
ServerManagement: increase importance of log message for multicast announce
TJ [Wed, 10 Jun 2015 09:17:20 +0000 (10:17 +0100)]
ServerManagement: fix Servers menu not disabling control options when servers disappear
TJ [Wed, 10 Jun 2015 09:15:35 +0000 (10:15 +0100)]
ServerSocial: remove Logger network handler to prevent duplicate messages on restart
TJ [Wed, 10 Jun 2015 09:11:16 +0000 (10:11 +0100)]
ServerSocial: introduce ExecutorService to manage network service thread and application lifecycle cleanly
TJ [Wed, 10 Jun 2015 06:58:30 +0000 (07:58 +0100)]
NetworkStreamManager: introduce ExecutorService to manage stream thread lifecycle cleanly
TJ [Mon, 8 Jun 2015 06:41:31 +0000 (07:41 +0100)]
ServerManagement: Send ServerControl STOP command
TJ [Mon, 8 Jun 2015 06:21:19 +0000 (07:21 +0100)]
ServerSocial: Handle corrupted or null member data
TJ [Mon, 8 Jun 2015 06:14:12 +0000 (07:14 +0100)]
ServerSocial: act on ServerControl STOP command
Eddie [Mon, 8 Jun 2015 04:44:58 +0000 (05:44 +0100)]
ClientGUI: exitCleanly() when Login dialog is cancelled/closed
Eddie [Mon, 8 Jun 2015 04:43:40 +0000 (05:43 +0100)]
Login (ClientGUI): remove TODOs and append email to @author
TJ [Sun, 7 Jun 2015 21:13:31 +0000 (22:13 +0100)]
ClientGUI, ServerSocial: make PING-PONG an Intent and count outstanding PINGs
TJ [Sun, 7 Jun 2015 09:55:07 +0000 (10:55 +0100)]
ServerManagement: improve table columns auto-width adjustment
TJ [Sat, 6 Jun 2015 18:50:19 +0000 (19:50 +0100)]
ClientGUI, ServerSocial: introduce TCP PING-PONG to detect connections dropping
TJ [Sat, 6 Jun 2015 18:14:20 +0000 (19:14 +0100)]
NetworkStream: tag received NetworkMessage with sender's IP protocol, address:port tuple
TJ [Sat, 6 Jun 2015 18:03:32 +0000 (19:03 +0100)]
NetworkStream: introduce getLocalAddress()
TJ [Sat, 6 Jun 2015 15:41:35 +0000 (16:41 +0100)]
ServerManagement: automatically adust table and window size to display table contents without truncation
TJ [Sat, 6 Jun 2015 13:28:15 +0000 (14:28 +0100)]
ClientGUI: Allow waitForServer() to set ProgressMonitor's duration
TJ [Sat, 6 Jun 2015 13:20:14 +0000 (14:20 +0100)]
ClientGUI: Use "WSYDClientGUI" as application default title
TJ [Sat, 6 Jun 2015 13:14:11 +0000 (14:14 +0100)]
ClientGUI: fix process not exiting when ProgressMonitor is cancelled by user
Eddie [Sat, 6 Jun 2015 10:45:41 +0000 (11:45 +0100)]
ClientGUI: user import wildcards, add ProgressMonitor, simplified logging, add new functionality...
* use import x.y.z.* wildcards to reduce clutter in header
* use project-standardised simplified logp()
* refactor some method names to be more descriptive e.g. loginDialog() -> doLogin()
* add exitCleanly() to shutdown background threads
* add setServiceTitles() to update network service Sender fields after user login
* add ServiceAddressMap updates from Neigbour multicast announcements (no longer done by NetworkServer*)
* Login intent: add self to members online
* add Logout intent handling
* replace main() with generic app handling used in all other project executables
Eddie [Sat, 6 Jun 2015 10:45:01 +0000 (11:45 +0100)]
Chat: (dialog) refactor Exception handler, edit javadoc
Eddie [Sat, 6 Jun 2015 10:44:26 +0000 (11:44 +0100)]
Login: (dialog) refactor Exception handler, edit javadoc
Eddie [Sat, 6 Jun 2015 10:40:29 +0000 (11:40 +0100)]
EditProfile: fix stack overflow, remove obsolete code, edit javadoc
Fix stack overflow: gLabelCurrLocation was pointing to itself - point it
to gFieldCurrLocation instead!
Eddie [Sat, 6 Jun 2015 10:20:00 +0000 (11:20 +0100)]
ServerSocial: add simplified logging, refactor variables, add new functionality...
* simplified logging
* replace console messages with logging
* refactor variables
* introduce setMemberOnlineState() to encapsulate all state-change functionality
* introduce unicastMemberPresence() to notify over TCP streams
* remove notifyMemberPresence(), memberOnline(), memberOffline()
* set member offline when client disappears
* at login use setMemberOnlineState() to do all required actions
* add ServiceAddressMap updates from Neigbour multicast announcements (no longer done by NetworkServer*)
* switch to logging via PacketHandler when LogServer is discovered
* replace main() with generic app handling used in all other project executables
Eddie [Sat, 6 Jun 2015 10:13:31 +0000 (11:13 +0100)]
ServerManagement: add Log Level support, simplified logging, "-noannounce" switch, refactor variables
Log Level support. Add radio buttons under menu Log > Level to allow
setting of the maximum log level to record.
Use simplified project-standardised logp().
Introduce -noannouce command-line switch to disable multicast
announcements. This is the inverse of "-announce".
Move some variables from Class to Method local scope, and visa versa.
Eddie [Sat, 6 Jun 2015 10:00:17 +0000 (11:00 +0100)]
PacketHandler: support changing sender ID and tagging outgoing messages
Eddie [Sat, 6 Jun 2015 09:56:31 +0000 (10:56 +0100)]
WSYD_Member_Comparator_UserName: fix javadoc
Eddie [Sat, 6 Jun 2015 09:55:24 +0000 (10:55 +0100)]
libs.message.*: add missing javadocs
Eddie [Sat, 6 Jun 2015 09:53:47 +0000 (10:53 +0100)]
MessageServerControl: add toString(), missing javadocs
Eddie [Sat, 6 Jun 2015 09:50:48 +0000 (10:50 +0100)]
MessageLogin: refactor variable names, add javadocs
Eddie [Sat, 6 Jun 2015 09:48:33 +0000 (10:48 +0100)]
MessageMemberState: use WSYD_Member.STATE, add missing javadocs
Eddie [Sat, 6 Jun 2015 09:42:22 +0000 (10:42 +0100)]
WSYD_Member: add enum STATE
Add support for representing online status in external objects. Online
status itself doesn't belong in the WSYD_Member but the member's
possible status values do.
Eddie [Sat, 6 Jun 2015 09:25:45 +0000 (10:25 +0100)]
NetworkServerUDPMulticast: use actual local port address, simplified logging
Eddie [Sat, 6 Jun 2015 09:17:36 +0000 (10:17 +0100)]
NetworkServerUDP: introduce _uniqueID, simplify logging, deserialize using packet length
* Introduce _uniqueID
* Simplify logging
* Use packet length when deserializing
* No longer update ServiceAddressMap
Introduce _uniqueID. Tag each outgoing NetworkMessage with this
service's unique ID to provide accurate loopback detection in receiver.
Use the super class simplified logging.
Pass the received DatagramPacket length when deserializing
NetworkMessage.
Do not try to update ServiceAddressMap. Leave to the NetworkMessageEventListener
which can access the messages contained within the NetworkMessage wrapper.
Eddie [Sat, 6 Jun 2015 09:13:16 +0000 (10:13 +0100)]
NetworkServerTCP: use simplified logging, pass logger to new streams, remove console debug
Eddie [Sat, 6 Jun 2015 09:04:57 +0000 (10:04 +0100)]
NetworkServerAbstract: add constructor taking NetworkMessageEventListenerManager, {set,get}Title(), missing javadocs, simplify logging
Modify constructors so there is one that will take an external
NetworkEventListenerManager rather than only creating one internally.
Make less specific argument list versions call their more specific
alternative.
Introduce {set,get}Title(). This supports clients that, after login, need to include
the userID in outgoing NetworkMessage, MessagePresence, and other data.
Simplify logging using a local project-standardised logp().
Eddie [Sat, 6 Jun 2015 08:58:40 +0000 (09:58 +0100)]
NetworkStreamManager: add closeAll(), missing javadocs
Introduce closeAll(). Provides public method for cleanly closing all
managed NetworkStreams.
Eddie [Sat, 6 Jun 2015 08:56:12 +0000 (09:56 +0100)]
NetworkSocketClosing: add missing javadoc
Eddie [Sat, 6 Jun 2015 08:43:34 +0000 (09:43 +0100)]
NetworkStream: simplify, add Logger, getRemoteAddress(), better cleanup and closing, javadocs
* simplify object deserialization
* support using application's Logger instance
* introduce getRemoteAddress()
* introduce close() and move close streams to done()
* fill out javadocs
Simplify object deserialization. Remove the now unused object length
functionality that was originally prefixed to the object in the serialized stream.
This allows the dropping of the indirect streams used to measure the
size of an object.
Logger. Pass in the application Logger instance to the constructor, add
the project-standardised simple logp() method and use it in place of
console error messages.
Introduce getRemoteAddress(). Provide public access to the stream's
remote host address so that NetworkMessage can be tagged with the
sender's address for easy ServiceAddressMap support.
Introduce close(). Provide public access to tell the stream to close
cleanly. Used by the NetworkStreamManager to close all streams cleanly
at shutdown.
Move the stream closing code into done().
Eddie [Sat, 6 Jun 2015 08:37:22 +0000 (09:37 +0100)]
WSYD_SocketAddress: add constructor for InetSocketAddress, missing javadocs
Introduce WSYD_SocketAddress(InetSocketAddress socketAddress, Protocol protocol)
New constructor to support easier creation of object instances for
tracking hosts that are inserted into ServiceAddressMap.
Eddie [Sat, 6 Jun 2015 08:35:01 +0000 (09:35 +0100)]
ServiceAddressMap: add missing javadoc
Eddie [Sat, 6 Jun 2015 08:31:57 +0000 (09:31 +0100)]
ConnectionEstablishedEvent*: add missing javadoc
Eddie [Sat, 6 Jun 2015 08:30:15 +0000 (09:30 +0100)]
NetworkMessageEventListenerManager: remove console debug, add author email
Eddie [Sat, 6 Jun 2015 07:54:03 +0000 (08:54 +0100)]
NetworkMessage: introduce _sendersUniqueID, _receivedFrom, fix serialize length issues, log Exceptions
* introduce _sendersUniqueID, _receivedFrom
* remove _class
* fix serialize length issue
* logging of Exceptions
_sendersUniqueID solves the issue of accurately detecting packets that
have looped back which can happen with UDP multicast unless the socket
is configured with MulitcastSocket.setLoopbackMode(false).
It is set by each object that sends messages. Those objects allocate themselves
a random, final, unique ID during construction.
Loopback was previously detected using _sender but that was fragile and had
unpredictable failures.
Introduced getReceivedFrom()
_receivedFrom is filled in by the receiving network service using the Protocol
IP:port of the sender. This solves a big issue with accurately
maintaining the ServiceAddressMap with correct IP:port tupals for
neighbour service discovery. That functionality sends MessagePresence
objects that are supposed to contain the senders IP:port.
In the case of sender services that bind to their local wildcard address
(0.0.0.0/0.0.0.0) that is the address received in the MessagePresence object,
and does not identify the true sending interface address, only the port number.
_class has been removed since it is no longer used. There is no need to
store a class type descriptor for the enclosed MessageAbstract object
since Java's streamed object serialization deals with that issue
internally.
Introduced deserialize(byte[] bytes, int length)
Serialized length. In some circumstances a NetworkMessage _serializedLength would
be set to the maximum size of a UDP packet payload (65507 bytes) rather
than its true size. This was caused by the backing byte[] buffer being
allocated that amount of memory and the deserialize code not being able
to detect the true size of the object within the buffer.
The new method allows the size of a received DatagramPacket payload to
be passed into the deserialize() method and used to control the size of
the backing buffer of the ByteArrayInputStream. Additional checks are
done to ensure that the size of the deserialized object is obtained from
the number of bytes read out of the ByteArrayInputStream.
Exception logging. This will create a local logger to report the issue.
This could be improved by finding a way to get the application's
logger so that exceptions are logged to the network Log Service when it
is active.
Eddie [Sat, 6 Jun 2015 07:29:30 +0000 (08:29 +0100)]
Network: refactor names, add server control port, clean comments
Make member names specific to the Internet Protocol version 4 that they
represent. This clears the way to add IPv6 support later.
Introduce PORTS_SERVER_CONTROL since notifications to clients are now
intended to take place over the TCP stream ServerSocial and each client
maintain.
Remove FIXME comments left over from solving the 'static final'
initialisation issue.
Eddie [Sat, 6 Jun 2015 07:15:14 +0000 (08:15 +0100)]
Launcher: add generalised executable class loading support
The launcher was intended as a single point of launch for all the
executable applications in the project: servers and clients.
The improvements here generalise the code to support loading of any
(executable) class using its own classloader and instantiating it.
The result is that a single Java Virtual Machine (JVM) will execute
all the project applications rather than the usual case where there
is a single executable application per JVM.
Experimentation with this single-JVM approach reveals that it is only
suitable for daemon services or console (terminal) applications but not
for any GUI application that is based on Java Abstract Window Toolkit
(AWT) and/or Java Swing.
The reason is that the AWT is written to only have a single Event
Disptacher thread per JVM, unless some extremely invasive modifcations
using custom classloaders is implemented.
For examples of the code required for that review the circa 2002 project
Echidna which unfortunately had its web-site disappear from the web in 2005.
The Internet Archive has the last snapshot of it from 2005-12-17:
https://web.archive.org/web/
20051217194617/http://www.javagroup.org/echidna/
The source code is still available from its SourceForge project
pages:
http://echidna.cvs.sourceforge.net/viewvc/echidna/echidna/
Eddie [Sat, 6 Jun 2015 07:08:34 +0000 (08:08 +0100)]
NetBeans: set explicit Java version for project
The default behaviour of a NetBeans project is to use the
platform-default Java version. If this differs from the version the
project is to run on there could be unexpected bugs such as
accidentally using standard library classes and/or methods that only
exist in the later Java version.
For example, this will prevent bugs creeping in when the platform-default
is Java 1.8 but the project is to be built and run on Java 1.7.
Eddie [Wed, 3 Jun 2015 12:06:53 +0000 (13:06 +0100)]
Add Registration functionality and tidy up
Eddie [Tue, 2 Jun 2015 16:18:12 +0000 (17:18 +0100)]
Merge branch 'feature_server_social'
Conflicts:
src/uk/ac/ntu/n0521366/wsyd/server/ServerSocial.java
Eddie [Tue, 2 Jun 2015 16:16:08 +0000 (17:16 +0100)]
Merge branch 'feature_client'
Eddie [Tue, 2 Jun 2015 16:15:41 +0000 (17:15 +0100)]
Merge branch 'feature_server_management'
Eddie [Tue, 2 Jun 2015 16:15:23 +0000 (17:15 +0100)]
management: use the Event Manager
Eddie [Tue, 2 Jun 2015 16:13:59 +0000 (17:13 +0100)]
client: send and receive network messages
Eddie [Tue, 2 Jun 2015 16:08:49 +0000 (17:08 +0100)]
ServerSocial: complete network message handling
Eddie [Tue, 2 Jun 2015 15:59:43 +0000 (16:59 +0100)]
libs.net: complete network functionality
Eddie [Tue, 2 Jun 2015 15:58:42 +0000 (16:58 +0100)]
libs.message: new Message types
Eddie [Mon, 1 Jun 2015 16:58:58 +0000 (17:58 +0100)]
Added stream manager and TCP listener
Eddie [Mon, 1 Jun 2015 16:56:56 +0000 (17:56 +0100)]
Implemented TCP streams for object serialization
TJ [Mon, 4 May 2015 18:57:18 +0000 (19:57 +0100)]
index.md: Add title, TOC, and custom CSS to generated HTML
TJ [Mon, 4 May 2015 17:07:53 +0000 (18:07 +0100)]
ServerManagement: log static ServiceAddressMap entries at startup
Logs values received from the command-line and any other static entries;
also remove commas from port numbers in log messages.
TJ [Mon, 4 May 2015 17:06:52 +0000 (18:06 +0100)]
NetworkServerUDP: remove comma from logged port numbers
TJ [Mon, 4 May 2015 17:04:24 +0000 (18:04 +0100)]
ServiceAddressMap: add getEntrySet()
Provides for iterating over the map, and make access to LastSeenHost
fields public.
TJ [Mon, 4 May 2015 16:26:44 +0000 (17:26 +0100)]
ServerManagement: user control of multicast announcements
Add menu item to Log menu allowing user to control multicast announcement
of the Log service.
Refactor the ActionListener and Timer to better reflect its use for performing
unrelated regular tasks.
TJ [Mon, 4 May 2015 16:26:01 +0000 (17:26 +0100)]
remove stray file
TJ [Mon, 4 May 2015 15:45:26 +0000 (16:45 +0100)]
ServiceAddressMap: add missing javadoc @param
TJ [Mon, 4 May 2015 15:43:18 +0000 (16:43 +0100)]
Correct HTML entities in javadoc
TJ [Mon, 4 May 2015 15:41:14 +0000 (16:41 +0100)]
NetworkServer*: remove unused imports
TJ [Mon, 4 May 2015 15:38:00 +0000 (16:38 +0100)]
ServerManagement: become owner of ServiceAddressMap
ServiceAddressMap is now application-wide so all network service daemons
use the same map.
Refactor variable names to better reflect their purpose ("Server" >
"Service").
TJ [Mon, 4 May 2015 15:35:52 +0000 (16:35 +0100)]
ServerSocial: refactor "Server" to "Service"
Refactor some variable names to better reflect their purpose, and
fix some indentation.
TJ [Mon, 4 May 2015 15:33:34 +0000 (16:33 +0100)]
ServiceAddressMap: improve public API
Make constructors public, add additional wrapper methods for the
underlying Map, and expand javadocs.
TJ [Mon, 4 May 2015 15:30:08 +0000 (16:30 +0100)]
NetworkServerUDPMulticast: move "all" target out
_serviceToHostMap has moved out of NetworkServerAbstract into
ServiceAddressMap and is now owned by the application class where
the 'all' target should be set.
TJ [Mon, 4 May 2015 15:27:29 +0000 (16:27 +0100)]
NetworkServerUDP: get actual ephemeral socket address
During construction of a service requesting an ephemeral port
ensure the services' internal SocketAddress reflects the actual
port allocated by the operating system.
TJ [Mon, 4 May 2015 15:24:41 +0000 (16:24 +0100)]
NetworkServerAbstract: add getSocketAddress()
Supports easy access and passing around of the socket address of the
service.
TJ [Mon, 4 May 2015 15:21:35 +0000 (16:21 +0100)]
Network: add PORTS_EPHEMERAL constant
This, rather than a plain 0, adds semmantic sugar to make it obvious when constructing
a socket and expecting to be given an ephemeral port by the operating system.
TJ [Mon, 4 May 2015 15:18:25 +0000 (16:18 +0100)]
NetworkPresence: encapsulate WSYD_SocketAddress
Storing a simple port number is not sufficient. The WSYD_SocketAddress
can be passed directly between hosts and into constructors, and for services
and sockets.
TJ [Sun, 3 May 2015 18:51:17 +0000 (19:51 +0100)]
report: add link for NetBeans per-file runtime command line arguments plugin
TJ [Sun, 3 May 2015 18:50:30 +0000 (19:50 +0100)]
Move ServiceToHostMap into stand-alone class ServiceAddressMap and refactor accordingly
TJ [Sun, 3 May 2015 10:50:14 +0000 (11:50 +0100)]
ServerManagement: add support for sending UDP Control messages to servers
TJ [Sun, 3 May 2015 10:48:48 +0000 (11:48 +0100)]
NetworkServerUDP: add additional logging
TJ [Sun, 3 May 2015 10:47:55 +0000 (11:47 +0100)]
NetworkServerAbstract: make LastSeenHost immutable and create method getTargeAddress() to query services map
Eddie [Sun, 3 May 2015 10:33:20 +0000 (11:33 +0100)]
Added UDP listener
Eddie [Sat, 2 May 2015 20:41:54 +0000 (21:41 +0100)]
Changed MessageServerControl to enums
Eddie [Sat, 2 May 2015 20:22:31 +0000 (21:22 +0100)]
Created MessageServerControl
Eddie [Sat, 2 May 2015 20:21:16 +0000 (21:21 +0100)]
Created MessageServerControl
Added SocialServer multicast handling
TJ [Sat, 2 May 2015 15:05:21 +0000 (16:05 +0100)]
Fix typo in port number
TJ [Sat, 2 May 2015 15:04:16 +0000 (16:04 +0100)]
Add To Do document
TJ [Sat, 2 May 2015 15:03:56 +0000 (16:03 +0100)]
Add link to ToDo document; restyle HTML
TJ [Sat, 2 May 2015 15:01:08 +0000 (16:01 +0100)]
Correct grammatical error
TJ [Sat, 2 May 2015 10:50:55 +0000 (11:50 +0100)]
We Stealz Your Dataz