|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectflex.management.ManageableComponent
flex.messaging.endpoints.AbstractEndpoint
flex.messaging.endpoints.BaseHTTPEndpoint
flex.messaging.endpoints.BaseStreamingHTTPEndpoint
public abstract class BaseStreamingHTTPEndpoint
Base for HTTP-based endpoints that support streaming HTTP connections to connected clients. Each streaming connection managed by this endpoint consumes one of the request handler threads provided by the servlet container, so it is not highly scalable but offers performance advantages over client polling for clients receiving a steady, rapid stream of pushed messages. This endpoint does not support polling clients and will fault any poll requests that are received. To support polling clients use subclasses of BaseHTTPEndpoint instead.
| Field Summary | |
|---|---|
static String |
POLL_NOT_SUPPORTED_CODE
Errors. |
static int |
POLL_NOT_SUPPORTED_MESSAGE
|
| Fields inherited from class flex.messaging.endpoints.AbstractEndpoint |
|---|
LOG_CATEGORY |
| Constructor Summary | |
|---|---|
BaseStreamingHTTPEndpoint()
Constructs an unmanaged BaseStreamingHTTPEndpoint. |
|
BaseStreamingHTTPEndpoint(boolean enableManagement)
Constructs an BaseStreamingHTTPEndpoint with the indicated management. |
|
| Method Summary | |
|---|---|
int |
getIdleTimeoutMinutes()
Returns the number of minutes a client can remain idle before the server times the connection out. |
int |
getMaxStreamingClients()
Returns the maximum number of clients that will be allowed to establish a streaming HTTP connection with the endpoint. |
long |
getServerToClientHeartbeatMillis()
Returns the number of milliseconds the server will wait before writing a single null byte to the streaming connection to make sure the client is still available. |
int |
getStreamingClientsCount()
Returns the the number of clients that are currently in the streaming state. |
void |
initialize(String id,
ConfigMap properties)
Initializes the Endpoint with the properties. |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Handles HTTP requests targetting this endpoint. |
void |
setIdleTimeoutMinutes(int idleTimeoutMinutes)
Sets the number of minutes a client can remain idle before the server times the connection out. |
void |
setMaxStreamingClients(int maxStreamingClients)
Sets the maximum number of clients that will be allowed to establish a streaming HTTP connection with the server. |
void |
setServerToClientHeartbeatMillis(long serverToClientHeartbeatMillis)
Returns the number of milliseconds the server will wait before writing a single null byte to the streaming connection to make sure the client is still available when there are no new messages for the client. |
void |
start()
Starts the Endpoint by creating a filter chain and setting
up serializers and deserializers. |
void |
stop()
Stops the endpoint if it's running. |
| Methods inherited from class flex.messaging.endpoints.BaseHTTPEndpoint |
|---|
getRedirectURL, isAddNoCacheHeaders, isInvalidateSessionOnDisconnect, setAddNoCacheHeaders, setInvalidateSessionOnDisconnect, setRedirectURL, setupFlexClient |
| Methods inherited from class flex.management.ManageableComponent |
|---|
getControl, getId, getParent, isManaged, isStarted, isValid, setControl, setManaged, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface flex.messaging.endpoints.Endpoint |
|---|
getId, isStarted |
| Methods inherited from interface flex.management.Manageable |
|---|
getControl, isManaged, setControl, setManaged |
| Field Detail |
|---|
public static final String POLL_NOT_SUPPORTED_CODE
public static final int POLL_NOT_SUPPORTED_MESSAGE
| Constructor Detail |
|---|
public BaseStreamingHTTPEndpoint()
BaseStreamingHTTPEndpoint.
public BaseStreamingHTTPEndpoint(boolean enableManagement)
BaseStreamingHTTPEndpoint with the indicated management.
enableManagement - true if the BaseStreamingHTTPEndpoint
is manageable; otherwise false.| Method Detail |
|---|
public void initialize(String id,
ConfigMap properties)
Endpoint with the properties.
If subclasses override, they must call super.initialize().
initialize in interface Endpointinitialize in interface FlexConfigurableinitialize in class BaseHTTPEndpointid - Id of the Endpoint.properties - Properties for the Endpoint.public void start()
BaseHTTPEndpointEndpoint by creating a filter chain and setting
up serializers and deserializers.
start in interface Endpointstart in interface FlexComponentstart in class BaseHTTPEndpointpublic void stop()
AbstractEndpointsuper.stop().
stop in interface Endpointstop in interface FlexComponentstop in class AbstractEndpointAbstractEndpoint.stop()public long getServerToClientHeartbeatMillis()
public void setServerToClientHeartbeatMillis(long serverToClientHeartbeatMillis)
public int getIdleTimeoutMinutes()
public void setIdleTimeoutMinutes(int idleTimeoutMinutes)
idleTimeoutMinutes - The number of minutes a client can remain idle
before the server times the connection out.public int getMaxStreamingClients()
public void setMaxStreamingClients(int maxStreamingClients)
maxStreamingClients - The maximum number of clients that will be allowed
to establish a streaming HTTP connection with the server.public int getStreamingClientsCount()
public void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
service in interface Endpointservice in class BaseHTTPEndpointreq - The original servlet requestres - The active servlet response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.html