A C D G H I J M N O P R S T U W

A

addContext(String, Handler) - Method in interface com.streamhub.api.PushServer
Adds or overrides a context.
addContext(String, Handler) - Method in class com.streamhub.nio.NIOServer
 
addField(String, String) - Method in class com.streamhub.api.JsonPayload
 
addField(String, String) - Method in interface com.streamhub.api.Payload
Adds a field to the message with the key and value.
addPublishListener(PublishListener) - Method in interface com.streamhub.api.SubscriptionManager
Adds a PublishListener which will be notified every time a client publishes some data
addStaticContent(File) - Method in interface com.streamhub.api.PushServer
Adds a directory to be served from the root context / as if it were a standard HTTP server.
addStaticContent(File, String) - Method in interface com.streamhub.api.PushServer
Adds a directory to be served from the a specified context as if it were a standard HTTP server.
addStaticContent(File) - Method in class com.streamhub.nio.NIOServer
 
addStaticContent(File, String) - Method in class com.streamhub.nio.NIOServer
 
addSubscriptionListener(SubscriptionListener) - Method in interface com.streamhub.api.SubscriptionManager
Adds a SubscriptionListener which will be notified every time a client subscribes to a topic

C

Client - Interface in com.streamhub.api
Represents a client - either a browser (Comet) client or a direct client using one of the thick client SDKs (e.g.
close() - Method in class com.streamhub.nio.SSLChannel
 
com.streamhub.api - package com.streamhub.api
The main classes and interfaces of the Streaming API.
com.streamhub.nio - package com.streamhub.nio
The main classes for creating and starting the server.

D

disconnect() - Method in interface com.streamhub.api.Client
Disconnects this client.

G

getFields() - Method in class com.streamhub.api.JsonPayload
 
getFields() - Method in interface com.streamhub.api.Payload
Returns a map of every single field added to this message
getSubscriptionManager() - Method in interface com.streamhub.api.PushServer
Returns the servers SubscriptionManager.
getSubscriptionManager() - Method in class com.streamhub.nio.NIOServer
 
getSubscriptions() - Method in interface com.streamhub.api.Client
Returns a list of every topic the client is currently subscribed to
getUid() - Method in interface com.streamhub.api.Client
Returns a unique ID for each client

H

handleRead() - Method in class com.streamhub.nio.SSLChannel
 
handleWrite() - Method in class com.streamhub.nio.SSLChannel
 

I

isConnected() - Method in interface com.streamhub.api.Client
Whether this client is currently connected and capable of receiving messages
isStarted() - Method in interface com.streamhub.api.PushServer
Identifies whether the server is currently started or not
isStarted() - Method in class com.streamhub.nio.NIOServer
 

J

JsonPayload - Class in com.streamhub.api
JsonPayload sends its message as a JSON string.
JsonPayload(String) - Constructor for class com.streamhub.api.JsonPayload
Creates a new JsonPayload with topic.

M

main(String[]) - Static method in class com.streamhub.nio.NIOServer
 

N

NIOServer - Class in com.streamhub.nio
The main Comet and HTTP Push server to which connections are made by all clients.
NIOServer(int) - Constructor for class com.streamhub.nio.NIOServer
Creates a new NIOServer bound to the wildcard address
NIOServer(InetSocketAddress) - Constructor for class com.streamhub.nio.NIOServer
Creates a new NIOServer bound to address.
NIOServer(InetSocketAddress, InetSocketAddress) - Constructor for class com.streamhub.nio.NIOServer
Creates a new NIOServer bound to address and a streaming adapter bound to streamingAdapterAddress
NIOServer(InetSocketAddress, InetSocketAddress, String) - Constructor for class com.streamhub.nio.NIOServer
Creates a new NIOServer bound to address and a streaming adapter bound to streamingAdapterAddress.
NIOServer(InetSocketAddress, InetSocketAddress, URL, URL) - Constructor for class com.streamhub.nio.NIOServer
Creates a new NIOServer bound to address and a streaming adapter bound to streamingAdapterAddress, loading the license and log4j xml configuration from the alternative locations specified by licenseUrl and log4jConfigurationUrl respectively.

O

onMessageReceived(Client, String, Payload) - Method in interface com.streamhub.api.PublishListener
This method will be called everytime a message is published by a client to the server.
onSubscribe(String, Client) - Method in interface com.streamhub.api.SubscriptionListener
Called when a client subscribes to a topic.
onUnSubscribe(String, Client) - Method in interface com.streamhub.api.SubscriptionListener
Called when a client unsubscribes from a topic.

P

Payload - Interface in com.streamhub.api
A Payload represents a message which is to be sent over the wire to a client or has been received from a client.
publish(String, Payload) - Method in interface com.streamhub.api.Publisher
Sends the payload to all clients who are subscribed to topic.
publish(String, Payload) - Method in class com.streamhub.nio.NIOServer
 
Publisher - Interface in com.streamhub.api
A Publisher allows you to publish to all subscribed clients on a particular topic.
PublishListener - Interface in com.streamhub.api
This interface is used to receive messages published by clients.
PushServer - Interface in com.streamhub.api
The server to which connections are made by clients.

R

read(ByteBuffer) - Method in class com.streamhub.nio.SSLChannel
 
registerForRead() - Method in class com.streamhub.nio.SSLChannel
 
registerForWrite() - Method in class com.streamhub.nio.SSLChannel
 
removePublishListener(PublishListener) - Method in interface com.streamhub.api.SubscriptionManager
Removes a PublishListener from being notified of publish events
removeSubscriptionListener(SubscriptionListener) - Method in interface com.streamhub.api.SubscriptionManager
Removes a SubscriptionListener from being notified of subscription events

S

SecureNIOServer - Class in com.streamhub.nio
A HTTPS version of NIOServer.
SecureNIOServer(int, SSLContext) - Constructor for class com.streamhub.nio.SecureNIOServer
Creates a new HTTPS server bound to the wildcard address.
SecureNIOServer(InetSocketAddress, SSLContext) - Constructor for class com.streamhub.nio.SecureNIOServer
Creates a new HTTPS server bound to address.
SecureNIOServer(InetSocketAddress, InetSocketAddress, SSLContext) - Constructor for class com.streamhub.nio.SecureNIOServer
Creates a new HTTPS server bound to address and a streaming adapter bound to streamingAdapterAddress
SecureNIOServer(InetSocketAddress, InetSocketAddress, String, SSLContext) - Constructor for class com.streamhub.nio.SecureNIOServer
Creates a new HTTPS server bound to address and a streaming adapter bound to streamingAdapterAddress.
SecureNIOServer(InetSocketAddress, InetSocketAddress, URL, URL, SSLContext) - Constructor for class com.streamhub.nio.SecureNIOServer
Creates a new HTTPS server bound to address and a streaming adapter bound to streamingAdapterAddress, loading the license and log4j xml configuration from the alternative locations specified by licenseUrl and log4jConfigurationUrl respectively.
send(String, Payload) - Method in interface com.streamhub.api.Client
Sends a message to this client on a particular topic
setDefaultHeader(String, String) - Method in interface com.streamhub.api.PushServer
Sets the value of a default HTTP header for synchronous responses.
setDefaultHeader(String, String) - Method in class com.streamhub.nio.NIOServer
 
setDefaultPushHeader(String, String) - Method in interface com.streamhub.api.PushServer
Sets the value of a default HTTP header for asynchronous push responses.
setDefaultPushHeader(String, String) - Method in class com.streamhub.nio.NIOServer
 
SSLChannel - Class in com.streamhub.nio
 
SSLChannel(SelectorThread, SocketChannel, ChannelListener, SSLEngine) - Constructor for class com.streamhub.nio.SSLChannel
 
start() - Method in interface com.streamhub.api.PushServer
Starts the server
start() - Method in class com.streamhub.nio.NIOServer
 
stop() - Method in interface com.streamhub.api.PushServer
Stops the server
stop() - Method in class com.streamhub.nio.NIOServer
 
SubscriptionListener - Interface in com.streamhub.api
This interface is used to receive callbacks when a client subscribes or unsubscribes from a topic.
SubscriptionManager - Interface in com.streamhub.api
Provides the core publish and subscribe listening capabilities of the server.

T

timestamp() - Method in class com.streamhub.api.JsonPayload
 
timestamp() - Method in interface com.streamhub.api.Payload
If timestamping is enabled, adds a field named 'timestamp' to the Payload with a value of System.currentTimeMillis().
toCometBytes() - Method in class com.streamhub.api.JsonPayload
 
toCometBytes() - Method in interface com.streamhub.api.Payload
Returns a byte array representing the bytes ready to be sent over the wire to a Comet client.
toggleTimestamping(boolean) - Method in class com.streamhub.api.JsonPayload
 
toggleTimestamping(boolean) - Method in interface com.streamhub.api.Payload
Toggles timestamping on or off.
toString() - Method in class com.streamhub.api.JsonPayload
 

U

unregisterForRead() - Method in class com.streamhub.nio.SSLChannel
 
unregisterForWrite() - Method in class com.streamhub.nio.SSLChannel
 

W

write(ByteBuffer) - Method in class com.streamhub.nio.SSLChannel
 

A C D G H I J M N O P R S T U W

Copyright © 2009 StreamHub. Tutorials, news and guides can be found on the StreamHub Comet Blog.