Get SpatialOS

Sites

Menu

Java SDK documentation

Worker SDK in Java

The Worker SDK in Java is an implementation of the Worker SDK that allows developers to build workers as part of a SpatialOS game in Java.

The SDK provides functionality to write a worker that:

The SDK also includes methods to load and save snapshots of the entire simulation from and to a file (see Manipulating snapshots).

A typical Java worker uses both the core API defined in the improbable.worker package, and Java generated code based on the user-specified simulated world schema.

Using the Worker SDK in Java

The Java API closely mirrors the C# API.

The most important units of functionality in the Java API are:

  • The improbable.worker.Locator, which is responsible for querying for and connecting to remote cloud deployments.
  • The improbable.worker.Connection, which represents a worker’s connection to a SpatialOS simulated world.
  • The improbable.worker.Dispatcher, which is responsible for invoking user-provided callbacks based on data received from SpatialOS via the improbable.worker.Connection.
  • The improbable.worker.Entity, which is a container for the component data associated with a single entity.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums