|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JSDT abstract client-side Channel proxy interface.
Method Summary | |
void |
addConsumer(com.sun.media.jsdt.Client client,
com.sun.media.jsdt.ChannelConsumer consumer)
addConsumer add a new channel consumer for this client. |
boolean |
dataAvailable(com.sun.media.jsdt.Client client)
dataAvailable |
java.lang.Object |
getProxy()
getProxy get a handle to the "client-side" proxy for this Channel. |
void |
initProxy(java.lang.String name,
SessionImpl session,
java.lang.Object object)
initProxy initialise the "client-side" proxy for this Channel. |
void |
join(com.sun.media.jsdt.Client client,
boolean authenticate,
int mode)
join is used by a client to join an appropriate channel whose use is defined by the application. |
void |
leave(com.sun.media.jsdt.Client client)
leave removes a Client from this Channel. |
java.lang.String[] |
listConsumerNames()
list the names of the Clients who are currently consuming this Channel. |
com.sun.media.jsdt.Data |
receive(com.sun.media.jsdt.Client client,
long timeout,
boolean ignoreTimeout)
receive is used to receive data from other clients joined to this channel. |
void |
removeConsumer(com.sun.media.jsdt.Client client,
com.sun.media.jsdt.ChannelConsumer consumer)
removeConsumer delete a channel consumer from this client. |
void |
send(com.sun.media.jsdt.Client sendingClient,
char recipient,
java.lang.String receivingClientName,
com.sun.media.jsdt.Data data,
boolean uniform)
send is used to send data to clients joined to the specified channel. |
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 Channel proxy being constructed.session
- the client-side session the Channel belongs to.object
- the client-side Channel.public java.lang.Object getProxy()
public void addConsumer(com.sun.media.jsdt.Client client, com.sun.media.jsdt.ChannelConsumer consumer) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchConsumerException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
client
- the client to associate this consumer with.consumer
- the new channel consumer for this client.public void removeConsumer(com.sun.media.jsdt.Client client, com.sun.media.jsdt.ChannelConsumer consumer) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchConsumerException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
client
- the client to associate this consumer with.consumer
- the channel consumer to delete from this client.public java.lang.String[] listConsumerNames() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
public void join(com.sun.media.jsdt.Client client, boolean authenticate, int mode) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.TimedOutException
client
- identifies the client wishing to join this channel.authenticate
- if true, authenticate the client.mode
- the mode which can be one of, READONLY, WRITEONLY or
READWRITE.public void leave(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
client
- the Client in question.public com.sun.media.jsdt.Data receive(com.sun.media.jsdt.Client client, long timeout, boolean ignoreTimeout) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
timeout
argument in milliseconds, has elapsed. If no Data is
available at this time, it will return null. Note that if Data becomes
available during the timeout period, this method will be woken up and
that Data is immediately returned.client
- identifies the client wishing to receive data from
this channel. This client must already be successfully joined to this
channel.timeout
- the maximum time to wait in milliseconds.ignoreTimeout
- ignore the timeout argument, and block until
data becomes available.public boolean dataAvailable(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
client
- identifies the client wishing to check if there is
data available to receive on this channel. This client must already be
successfully joined to this channel.public void send(com.sun.media.jsdt.Client sendingClient, char recipient, java.lang.String receivingClientName, com.sun.media.jsdt.Data data, boolean uniform) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchConsumerException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.TimedOutException
sendingClient
- the client sending the data.recipient
- who is going to receive this message. This can
be all channel receipts (ChannelImpl.D_All), or all other channel
recipients (ChannelImpl.D_Others) or just a single client
(ChannelImpl.D_Client).receivingClientName
- the name of the client receiving the
data, or null if we are sending this message to all (or all other) channel
recipients.data
- the data being send over this channel.uniform
- set true if this is a uniform send.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |