Search code examples
javarmi

Java RMI server registry connection observer trigger


Is it possible to get some kind of notification from the registry when a new server is connected to a local RMI registry instance?


Solution

  • Not with the standard registry interface; there's nothing in it to allow you to register a callback with the registry for it to notify you by.

    That's not to say that you couldn't write a registry that did this, extending the Registry interface with the necessary capabilities, etc. It's just that the standard registry doesn't do that. It's a very simple, primarily passive service (which has the advantage of there not being that much to go wrong with it, a good feature in a foundational component).