EM.3. The Semantics

To employ the event mailbox service, a client must first register with the event mailbox service by invoking the EventMailbox interface’s only method, register. Each invocation of the register method produces a new registration.

The register method may throw a RemoteException or a LeaseDeniedException. Typically, a RemoteException occurs when there is a communication failure between the client and the event mailbox service. If this exception does occur, the registration may or may not have been successful. A LeaseDeniedException is thrown if the event mailbox service is unable or unwilling to grant the registration request. It is implementation specific as to whether or not subsequent attempts (with or without the same argument) are likely to succeed.

Each registration with the event mailbox service is persistent across restarts or crashes of the event mailbox service, until the lease on the registration expires or is cancelled.

The register method takes a single parameter of type long that represents the requested initial lease duration for the registration, in milliseconds. This duration value must be positive (except for the special value of Lease.ANY). Otherwise, an IllegalArgumentException is thrown.

Every method invocation on an event mailbox service (whether the invocation is directly on the service, or indirectly on a MailboxRegistration that the service has created) is atomic with respect to other invocations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.111