com.r3corda.core.serialization / SingletonSerializeAsToken

# SingletonSerializeAsToken

`abstract class SingletonSerializeAsToken : SerializeAsToken`

A base class for implementing large objects / components / services that need to serialize themselves to a string token to indicate which instance the token is a serialized form of.

### Constructors

<init> | `SingletonSerializeAsToken()` A base class for implementing large objects / components / services that need to serialize themselves to a string token to indicate which instance the token is a serialized form of.

### Functions

toToken | `open fun toToken(context: SerializeAsTokenContext): SerializationToken`

### Inheritors

AbstractNode | `abstract class AbstractNode : SingletonSerializeAsToken` A base node implementation that can be customised either for production (with real implementations that do real I/O), or a mock implementation suitable for unit test environments.
AbstractNodeService | `abstract class AbstractNodeService : SingletonSerializeAsToken` Abstract superclass for services that a node can host, which provides helper functions.
ArtemisMessagingComponent | `abstract class ArtemisMessagingComponent : SingletonSerializeAsToken` The base class for Artemis services that defines shared data structures and transport configuration
E2ETestKeyManagementService | `class E2ETestKeyManagementService : SingletonSerializeAsToken, KeyManagementService` A simple in-memory KMS that doesnt bother saving keys to disk. A real implementation would:
InMemoryIdentityService | `class InMemoryIdentityService : SingletonSerializeAsToken, IdentityService` Simple identity service which caches parties and provides functionality for efficient lookup.
InMemoryMessaging | `inner class InMemoryMessaging : SingletonSerializeAsToken, MessagingServiceInternal` An InMemoryMessaging provides a MessagingService that isnt backed by any kind of network or disk storage system, but just uses regular queues on the heap instead. It is intended for unit testing and developer convenience when all entities on the network are being simulated in-process.
InMemoryMessagingNetwork | `class InMemoryMessagingNetwork : SingletonSerializeAsToken` An in-memory network allows you to manufacture InMemoryMessagings for a set of participants. Each InMemoryMessaging maintains a queue of messages it has received, and a background thread that dispatches messages one by one to registered handlers. Alternatively, a messaging system may be manually pumped, in which case no thread is created and a caller is expected to force delivery one at a time (this is useful for unit testing).
InMemoryNetworkMapCache | `open class InMemoryNetworkMapCache : SingletonSerializeAsToken, NetworkMapCache` Extremely simple in-memory cache of the network map.
InMemoryWalletService | `open class InMemoryWalletService : SingletonSerializeAsToken, WalletService` This class implements a simple, in memory wallet that tracks states that are owned by us, and also has a convenience method to auto-generate some self-issued cash states that can be used for test trading. A real wallet would persist states relevant to us into a database and once such a wallet is implemented, this scaffolding can be removed.
MockIdentityService | `class MockIdentityService : IdentityService, SingletonSerializeAsToken`
MockKeyManagementService | `class MockKeyManagementService : SingletonSerializeAsToken, KeyManagementService`
MockStorageService | `class MockStorageService : SingletonSerializeAsToken, TxWritableStorageService`
MonitoringService | `class MonitoringService : SingletonSerializeAsToken` Provides access to various metrics and ways to notify monitoring services of things, for sysadmin purposes. This is not an interface because it is too lightweight to bother mocking out.
NodeSchedulerService | `class NodeSchedulerService : SchedulerService, SingletonSerializeAsToken` A first pass of a simple SchedulerService that works with MutableClocks for testing, demonstrations and simulations that also encompasses the Wallet observer for processing transactions.
ProtocolLogicRefFactory | `class ProtocolLogicRefFactory : SingletonSerializeAsToken` A class for conversion to and from ProtocolLogic and ProtocolLogicRef instances.
StorageServiceImpl | `open class StorageServiceImpl : SingletonSerializeAsToken, TxWritableStorageService`