Consider the following example
@Remote
public interface RegistrationService {
public String register();
public void unregister(String id);
public void heartbeat(String id);
}
@Stateless
@Remote(RegistrationService.class)
public class RegistrationServiceBean implements RegistrationService {
/* ... */
}
I have an interface, lets say RegistrationService. With this, a remote client is able to register itself onto the application. By calling heartbeat() periodically, it signals that it is still alive.
What would be the correct way to document EJBs and their interfaces?
For example:
Interface
Class
Any thoughts appreciated. Thanks.
Sven
Interface javadoc should have no information about the implementation. Interfaces are about the what, not the how.
For example, it would be valid for the implementation to completely ignore calls made to the interface's methods - ie have an empty method.
Your javadoc should say something like: Notifies that the specified application is still alive
. What the implementation chooses to do with that information is up to it.