|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChannelService
ChannelService
allows you to manage manage two-way connections
with clients.
Method Summary | |
---|---|
java.lang.String |
createChannel(java.lang.String clientId)
Creates a channel associated with the provided clientId . |
ChannelMessage |
parseMessage(HttpServletRequest request)
Parse the incoming message in request . |
ChannelPresence |
parsePresence(HttpServletRequest request)
Parse the incoming presence in request . |
void |
sendMessage(ChannelMessage message)
Sends a ChannelMessage to the client. |
Method Detail |
---|
java.lang.String createChannel(java.lang.String clientId)
clientId
.
clientId
- A string uniquely identifying the client that will use the
returned token to connect to this channel. This string must be fewer
than 64 bytes when encoded to UTF-8.
ChannelFailureException
- if there is an error encountered while
communicating with the channel service.void sendMessage(ChannelMessage message)
ChannelMessage
to the client.
message
- the message to be sent to all connected clients.
ChannelFailureException
- if there is an error encountered while
communicating with the channel service.ChannelMessage parseMessage(HttpServletRequest request)
request
. This method should only
be called within a channel webhook.
request
- the source HTTP request.
ChannelMessage
.
java.lang.IllegalStateException
- if the required HTTP parameters are not
present.ChannelPresence parsePresence(HttpServletRequest request) throws java.io.IOException
request
. This method should only
be called within a channel presence request handler.
request
- the source HTTP request.
ChannelPresence
.
java.io.IOException
- if the MIME body isn't parseable.
java.lang.IllegalArgumentException
- if the HTTP request doesn't conform to
expectations.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |