|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.reggie.Registration
class Registration
Implementation class for the ServiceRegistration interface.
Field Summary | |
---|---|
(package private) ServiceLease |
lease
The service lease |
private static long |
serialVersionUID
|
(package private) Registrar |
server
The registrar |
Constructor Summary | |
---|---|
Registration(Registrar server,
ServiceLease lease)
Constructor for use by getInstance(), ConstrainableRegistration. |
Method Summary | |
---|---|
void |
addAttributes(Entry[] attrSets)
Adds the specified attribute sets (those that aren't duplicates of existing attribute sets) to the registered service item. |
boolean |
equals(Object obj)
Returns true if registration Uuids match, false otherwise. |
(package private) static Registration |
getInstance(Registrar server,
ServiceLease lease)
Returns Registration or ConstrainableRegistration instance, depending on whether given server implements RemoteMethodControl. |
Lease |
getLease()
Returns the lease that controls the service registration, allowing the lease to be renewed or cancelled. |
Uuid |
getReferentUuid()
Return the Uuid that has been assigned to the
resource this proxy represents. |
ServiceID |
getServiceID()
Returns the service ID for this service. |
int |
hashCode()
Returns the registration Uuid's hash code. |
void |
modifyAttributes(Entry[] attrSetTmpls,
Entry[] attrSets)
Modifies existing attribute sets. |
private void |
readObject(ObjectInputStream in)
Verifies that member fields are non-null. |
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required. |
void |
setAttributes(Entry[] attrSets)
Deletes all of the service item's existing attributes, and replaces them with the specified attribute sets. |
String |
toString()
Returns a string created from the proxy class name and the result of calling toString on the contained lease. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
final Registrar server
final ServiceLease lease
Constructor Detail |
---|
Registration(Registrar server, ServiceLease lease)
Method Detail |
---|
static Registration getInstance(Registrar server, ServiceLease lease)
public ServiceID getServiceID()
ServiceRegistration
getServiceID
in interface ServiceRegistration
public Lease getLease()
ServiceRegistration
getLease
in interface ServiceRegistration
public void addAttributes(Entry[] attrSets) throws UnknownLeaseException, RemoteException
ServiceRegistration
addAttributes
in interface ServiceRegistration
attrSets
- attribute sets to add
UnknownLeaseException
- the registration lease has expired
or been cancelled.
RemoteException
public void modifyAttributes(Entry[] attrSetTmpls, Entry[] attrSets) throws UnknownLeaseException, RemoteException
ServiceRegistration
Note that it is possible to use modifyAttributes in ways that are not idempotent. The attribute schema should be designed in such a way that all intended uses of this method can be performed in an idempotent fashion. Also note that modifyAttributes does not provide a means for setting a field to null; it is assumed that the attribute schema is designed in such a way that this is not necessary.
modifyAttributes
in interface ServiceRegistration
attrSetTmpls
- attribute set templates to matchattrSets
- modifications to make to matching attribute sets
UnknownLeaseException
- the registration lease has expired
or been cancelled
RemoteException
public void setAttributes(Entry[] attrSets) throws UnknownLeaseException, RemoteException
ServiceRegistration
setAttributes
in interface ServiceRegistration
attrSets
- attribute sets to use
UnknownLeaseException
- the registration lease has expired
or been cancelled
RemoteException
public Uuid getReferentUuid()
ReferentUuid
Uuid
that has been assigned to the
resource this proxy represents.
getReferentUuid
in interface ReferentUuid
Uuid
associated with the
resource this proxy represents. Will not
return null
.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |