class MailboxProxy extends Object implements PullEventMailbox, Administrable, Serializable, ReferentUuid
PullEventMailbox
and the
Administrable
interfaces.Modifier and Type | Class and Description |
---|---|
(package private) static class |
MailboxProxy.ConstrainableMailboxProxy
A subclass of MailboxProxy that implements RemoteMethodControl.
|
Modifier and Type | Field and Description |
---|---|
(package private) MailboxBackEnd |
mailbox
The reference to the event mailbox service implementation
|
(package private) Uuid |
proxyID
The proxy's
Uuid |
private static long |
serialVersionUID |
Modifier | Constructor and Description |
---|---|
private |
MailboxProxy(MailboxBackEnd mailbox,
Uuid proxyID)
Convenience constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) static MailboxProxy |
create(MailboxBackEnd mailbox,
Uuid id)
Creates a mailbox proxy, returning an instance
that implements RemoteMethodControl if the server does too.
|
boolean |
equals(Object o)
Proxies for servers with the same
proxyID are
considered equal. |
Object |
getAdmin()
Returns an object that implements whatever administration interfaces
are appropriate for the particular service.
|
Uuid |
getReferentUuid()
Returns the universally unique identifier that has been assigned to the
resource this proxy represents.
|
int |
hashCode()
Proxies for servers with the same proxyID have the same hash code.
|
MailboxPullRegistration |
pullRegister(long duration)
Defines the interface to the event mailbox service.
|
private void |
readObject(ObjectInputStream s)
When an instance of this class is deserialized, this method is
automatically invoked.
|
private void |
readObjectNoData()
During deserialization of an instance of this class, if it is found
that the stream contains no data, this method is automatically
invoked.
|
MailboxRegistration |
register(long duration)
Defines the interface to the event mailbox service.
|
private static final long serialVersionUID
final MailboxBackEnd mailbox
final Uuid proxyID
Uuid
private MailboxProxy(MailboxBackEnd mailbox, Uuid proxyID)
static MailboxProxy create(MailboxBackEnd mailbox, Uuid id)
mailbox
- the server proxyid
- the ID of the serverpublic MailboxRegistration register(long duration) throws RemoteException, LeaseDeniedException
EventMailbox
register
method to register themselves with
the service.register
in interface EventMailbox
duration
- the requested lease duration in millisecondsMailboxRegistration
RemoteException
- if there is
a communication failure between the client and the service.LeaseDeniedException
- if the mailbox service is unable or unwilling to grant this
registration request.public MailboxPullRegistration pullRegister(long duration) throws RemoteException, LeaseDeniedException
PullEventMailbox
pullRegister
method to register themselves with
the service.pullRegister
in interface PullEventMailbox
duration
- the requested lease duration in millisecondsMailboxPullRegistration
RemoteException
- if there is
a communication failure between the client and the service.LeaseDeniedException
- if the mailbox service is unable or unwilling to grant this
registration request.public Object getAdmin() throws RemoteException
Administrable
getAdmin
in interface Administrable
RemoteException
JoinAdmin
public Uuid getReferentUuid()
getReferentUuid
in interface ReferentUuid
Uuid
that is associated with the
resource this proxy represents. This method will not return
null
.ReferentUuid
public int hashCode()
public boolean equals(Object o)
proxyID
are
considered equal.private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the state of the
deserialized instance of this class is found to be invalid.IOException
ClassNotFoundException
private void readObjectNoData() throws ObjectStreamException
InvalidObjectException
- to indicate that there
was no data in the stream during deserialization of an
instance of this class; declaring that something is wrong.ObjectStreamException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.