Hi everyone!
I'm facing an issue while trying to develop a custom agent space.
In particular I'd like to leverage Java generics bu I cannot figure out how to instantiate such spaces by means of a corresponding space specification.
I'd like to instantiate special spaces devised for propagating only specific events.
I defined the space, by using Java generics, as follows:
interface MySpace<T extends Event> extends OpenEventSpace
and the corresponding implementation as follows:
class MySpaceImpl<T extends Event> extends OpenLocalEventSpace implements MySpace<T>
I then defined a generic space specification:
class MySpaceSpecification<T extends Failure> implements SpaceSpecification<MySpace<T>>
The create method should return an instance of ExceptionSpaceImpl<T>.
Unfortunately, I cannot manage to make the defaultContext.getOrCreateSpaceWithSpec
method work with generics in any way.
Do you, by chance, have any insight on what may I be missing?
Thank you very much in advance!
Best wishes,
Stefano