You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 11, 2023. It is now read-only.
Be able to configure in the PersistenceConfig how different error or situation occurred during an object serialisation or deserialization should be handled
Goals
Enhance the flexibility of the program
Enhance the user's control over security
Help the user to write an application that can communicate with applications of another version.
Motivations
The feature can be very interesting for runtime-added classes (Java modules, plugins) or for engines that runs an application
with different versions (ex: Server/Client).
Classes that does not exists on the current engine
If an engine receives a packet that contains
valconfig=newPersistenceConfigBuilder {
on unknownType "org.myapp.component.*" λ (tpe, remote) =>null//null will be used instead
on unknownType "org.myapp.player.*" λ (tpe, remote) =>UnknownObject(args) //UnknownObject alternative will be used instead
on unknownImplementation[MyInterface] λ (tpe, remote) =>StubImplementation(args) //use a custom alternative
on unknownTypePersistence "org.myapp.component.*" λ (tpe, args, remote) => remote.askPersistence[UnsafeTypePersistence] //We will ask to the sender if it can send a version of the serialised object, serialised with an UnsafeTypePersistence
on failedObjectPersistence "org.myapp.*" λ (tpe, args, failure, remote) =>throw failure.exception //throw the catched exception
on reference[TrafficReference] containedIn[ContainerObject] λ (obj, remote) =>newAlternative() //all network objects referenced by a TrafficReference that are contained in any objects of type `ContainerObject` are to be replaced by an alternative
}
The text was updated successfully, but these errors were encountered:
Summary
Be able to configure in the
PersistenceConfig
how different error or situation occurred during an object serialisation or deserialization should be handledGoals
Motivations
The feature can be very interesting for runtime-added classes (Java modules, plugins) or for engines that runs an application
with different versions (ex: Server/Client).
Classes that does not exists on the current engine
If an engine receives a packet that contains
The text was updated successfully, but these errors were encountered: