|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JSDT abstract client-side Token proxy interface.
Method Summary | |
java.lang.Object |
getProxy()
getProxy get a handle to the "client-side" proxy for this Token. |
int |
give(com.sun.media.jsdt.Client client,
java.lang.String receivingClientName)
used by a Client to surrender a Token to another Client. |
int |
grab(com.sun.media.jsdt.Client client,
boolean exclusive)
used by a Client to take exclusive (grab) or non-exclusive (inhibit) control of a specific Token. |
void |
initProxy(java.lang.String name,
SessionImpl session,
java.lang.Object object)
initProxy initialise the "client-side" proxy for this Token. |
java.lang.String[] |
listHolderNames()
list the names of the Clients who are currently holding (grabbing or inhibiting) this Token. |
int |
release(com.sun.media.jsdt.Client client)
used to free up a previously grabbed/inhibited Token. |
int |
request(com.sun.media.jsdt.Client client)
used by a Client to request a Token from the current possessor(s) of the Token. |
int |
test()
used to check the status of a Token. |
Methods inherited from interface com.sun.media.jsdt.impl.AbstractManageableProxy |
addListener,
changeListenerMask,
changeManagerMask,
destroy,
expel,
getSession,
invite,
isManaged,
join,
leave,
listClientNames,
removeListener |
Method Detail |
public void initProxy(java.lang.String name, SessionImpl session, java.lang.Object object)
name
- the name of the Token proxy being constructed.session
- the client-side session the Token belongs to.object
- the client-side Token.public java.lang.Object getProxy()
public int give(com.sun.media.jsdt.Client client, java.lang.String receivingClientName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
A GIVEN TokenEvent is delivered to the Token listener of the Client that this Client would like to give the Token to.
A Token being passed between two Clients and whose possession is not yet resolved will appear to any Client requesting test to be giving by some other Client and not held by the requestor. grab will fail during this interval, even if requested by one of the two Clients involved. release requested by the given will succeed, with the result that the Token is released if the offer to the recipient is ultimately rejected. release by the recipient will have no effect, just like the attempted release of any other Token that the requester does not yet possess. During the interval that a Token is being passed any request indications that are generated will be delivered to both Clients involved.
client
- the Client giving this Token.receivingClientName
- the name of the Client to receive
the Token.public int grab(com.sun.media.jsdt.Client client, boolean exclusive) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
With an exclusive grab, the grab will succeed if the requestor is the sole inhibitor of the Token.
The non-exclusive grab is used to take non-exclusive control of a specific * Token. It is used to prevent someone else from exclusively grabbing the Token. Several Clients could inhibit a Token at the same time. This operation will succeed if the requestor has grabbed the Token. The result will be that the Token is no longer grabbed exclusively and is inhibited instead. Therefore it may be inhibited by other Clients too.
client
- the Client grabbing/inhibiting this Token.exclusive
- indicates whether the grab should be exclusive.public java.lang.String[] listHolderNames() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.TimedOutException
test
method to determine if the token is being grabbed or
inhibited.public int request(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
client
- the Client requesting this Token.public int release(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.ClientNotGrabbingException, com.sun.media.jsdt.ClientNotReleasedException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
client
- the Client releasing this Token.public int test() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.TimedOutException
NOT_IN_USE : not in use GRABBED : grabbed INHIBITED : inhibited GIVING : giving
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |