Script to run TraderDemo now specified network map service rather than timestamper service.
TraderDemo now explicitly states the services it needs to run. Previously this was implied by whether a timestamper service was specified, and the code was not updated when that change was made.
This patch splits internal services (to be referred to as "subsystems") from
external services (retaining the label "services"). This makes it clear which
are components of the node for its own use (such as the identity subsystem,
network map cache, wallet, etc.) and which are exposed for other nodes to use.
Further work is needed on consistency in naming, this just introduces the basic
restructuring.
Remove the ability to remove registered identities. Once registered, identities are part
of a permanent record (for example you would want to ensure parties to contracts cannot
"disappear" by removing themselves from the identity service).
Also, make ServiceAffinityExecutor subclass ThreadPoolExecutor instead of delegating to ScheduledThreadPoolExecutor. This fixes an issue with exception reporting.
* Use the new AffinityExecutor code to fix some thread affinity issues where callbacks were running on the wrong threads. Add affinity assertions.
* Remove sleeps from UpdateBusinessDayProtocol.
* Remove a one-shot message handler before the callback is executed.
* Store un-routed messages in memory in ArtemisMessagingService to fix handler registration/message races. This is a temporary kludge until we use Artemis/MQ better.
Move FixedIdentityService to MockIdentityService under testing as it's specialised for use in tests.
Add a new InMemoryIdentityService replacing the fixed identity service in AbstractNode.
* Replace use of TestWithInMemoryNetwork by InMemoryMessagingTests with MockNetwork
* Replace use of TestWithInMemoryNetwork by TimestamperNodeServiceTest with MockNetwork
* Remove reference to TestWithInMemoryNetwork from TwoPartyTradeProtocolTests
Replace the forced ID passed into MockNode with the actual ID. This ensures
mock nodes are aware of their ID as the MockNetwork sees it, essentially
always forcing ID to be overriden.
Better usage of generics in groupStates so the group exposes the grouping key that was used, this avoids constructs like `val issuer = outputs[0].deposit.party` which is a bit ugly.
This simplifies the serialisation code, reduces the use of inline functions, and ensures that running SerializedBytes<SuperClass>.deserialise() will correctly return SubClass if that's what it contained, efficiently.