|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the user side interface of a distributed resource service.
It permit resource users to communicate with their respective resource
coordinators. Tipically, the user side of a sharing protocol will use this
interface to communicate with the corresponding coordinator side, while the
coordinator will use the DistResCoordinatorService
interface.
The newLocalNode
of the DistResServiceManager
interface should be used to retrieve this interface.
DistResServiceManager
,
DistResUser
,
DistResCoordinator
Method Summary | |
java.io.Serializable |
getNodeId()
Returns the id of the local node. |
DistResUser |
getUser(java.lang.Object resId)
Gets the user interface associated with a given resource identifier. |
boolean |
joinUsers(java.lang.Object resId,
DistResUser dru)
Request the coordinator(s) to join the users of a resource. |
void |
sendToCoordinator(java.lang.Object resId,
java.io.Serializable message)
Asynchronously sends a message to the coordinator(s). |
Method Detail |
public boolean joinUsers(java.lang.Object resId, DistResUser dru) throws UseNotGrantedException, java.lang.InterruptedException
resId
- the id of the related resourcedru
- the user to which messages must be delivered
UseNotGrantedException
- if the joining has not been accepted
java.lang.InterruptedException
- if the thread has been interrupted during
the operationpublic void sendToCoordinator(java.lang.Object resId, java.io.Serializable message) throws NotUserException
resId
- the id of the resourcemessage
- the message to send
NotUserException
- if the not is not registered has a user of
this resourcepublic java.io.Serializable getNodeId()
public DistResUser getUser(java.lang.Object resId)
resId
- the id of the coresponding resource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |