flex.messaging.endpoints
Class BaseHTTPEndpoint

java.lang.Object
  extended by flex.management.ManageableComponent
      extended by flex.messaging.endpoints.AbstractEndpoint
          extended by flex.messaging.endpoints.BaseHTTPEndpoint
All Implemented Interfaces:
Manageable, Endpoint, Endpoint2, FlexComponent, FlexConfigurable
Direct Known Subclasses:
BasePollingHTTPEndpoint, BaseStreamingHTTPEndpoint

public abstract class BaseHTTPEndpoint
extends AbstractEndpoint

Base for all of HTTP-based endpoints.


Field Summary
 
Fields inherited from class flex.messaging.endpoints.AbstractEndpoint
LOG_CATEGORY
 
Constructor Summary
BaseHTTPEndpoint()
          Constructs an unmanaged BaseHTTPEndpoint.
BaseHTTPEndpoint(boolean enableManagement)
          Constructs an BaseHTTPEndpoint with the indicated management.
 
Method Summary
 String getRedirectURL()
          Returns the redirect-url property.
 void initialize(String id, ConfigMap properties)
          Initializes the Endpoint with the properties.
 boolean isAddNoCacheHeaders()
          Returns the add-no-cache-headers property.
 boolean isInvalidateSessionOnDisconnect()
          Indicates whether the server session will be invalidated when a client channel disconnects.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handle AMF/AMFX encoded messages sent over HTTP.
 void setAddNoCacheHeaders(boolean addNoCacheHeaders)
          Sets the add-no-cache-headers property.
 void setInvalidateSessionOnDisconnect(boolean value)
          Set to true to invalidate the server session for a client that disconnects its channel.
 void setRedirectURL(String redirectURL)
          Sets the redirect-url property.
 FlexClient setupFlexClient(String id)
          Overrides to guard against duplicate HTTP-based sessions for the same FlexClient which will occur if the remote host has disabled session cookies.
 void start()
          Starts the Endpoint by creating a filter chain and setting up serializers and deserializers.
 
Methods inherited from class flex.messaging.endpoints.AbstractEndpoint
describeEndpoint, getClientType, getFlexClientOutboundQueueProcessorClass, getFlexClientOutboundQueueProcessorConfig, getMessageBroker, getMessagingVersion, getPort, getSecurityConstraint, getSerializationContext, getServer, getTypeMarshaller, getUrl, isSecure, serviceMessage, setClientType, setFlexClientOutboundQueueProcessorClass, setFlexClientOutboundQueueProcessorConfig, setId, setMessageBroker, setSecurityConstraint, setSerializationContext, setServer, setTypeMarshaller, setupFlexClient, setUrl, stop
 
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
 

Constructor Detail

BaseHTTPEndpoint

public BaseHTTPEndpoint()
Constructs an unmanaged BaseHTTPEndpoint.


BaseHTTPEndpoint

public BaseHTTPEndpoint(boolean enableManagement)
Constructs an BaseHTTPEndpoint with the indicated management.

Parameters:
enableManagement - true if the BaseHTTPEndpoint is manageable; otherwise false.
Method Detail

initialize

public void initialize(String id,
                       ConfigMap properties)
Initializes the Endpoint with the properties. If subclasses override, they must call super.initialize().

Specified by:
initialize in interface Endpoint
Specified by:
initialize in interface FlexConfigurable
Overrides:
initialize in class AbstractEndpoint
Parameters:
id - Id of the Endpoint.
properties - Properties for the Endpoint.

start

public void start()
Starts the Endpoint by creating a filter chain and setting up serializers and deserializers.

Specified by:
start in interface Endpoint
Specified by:
start in interface FlexComponent
Overrides:
start in class AbstractEndpoint

isAddNoCacheHeaders

public boolean isAddNoCacheHeaders()
Returns the add-no-cache-headers property.

Returns:
true if add-no-cache-headers is enabled; otherwise false.

setAddNoCacheHeaders

public void setAddNoCacheHeaders(boolean addNoCacheHeaders)
Sets the add-no-cache-headers property.

Parameters:
addNoCacheHeaders -

isInvalidateSessionOnDisconnect

public boolean isInvalidateSessionOnDisconnect()
Indicates whether the server session will be invalidated when a client channel disconnects. Default is false.

Returns:
true if the server session will be invalidated when a client channel disconnects.

setInvalidateSessionOnDisconnect

public void setInvalidateSessionOnDisconnect(boolean value)
Set to true to invalidate the server session for a client that disconnects its channel. Default is false.

Parameters:
value - Set to true to invalidate the server session for a client that disconnects its channel.

getRedirectURL

public String getRedirectURL()
Returns the redirect-url property.

Returns:
The redirect-url property.

setRedirectURL

public void setRedirectURL(String redirectURL)
Sets the redirect-url property.

Parameters:
redirectURL -

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
Handle AMF/AMFX encoded messages sent over HTTP.

Specified by:
service in interface Endpoint
Overrides:
service in class AbstractEndpoint
Parameters:
req - The original servlet request.
res - The active servlet response.

setupFlexClient

public FlexClient setupFlexClient(String id)
Overrides to guard against duplicate HTTP-based sessions for the same FlexClient which will occur if the remote host has disabled session cookies.

Overrides:
setupFlexClient in class AbstractEndpoint
Parameters:
id - The FlexClient id value from the client.
Returns:
The FlexClient or null if the provided id was null.
See Also:
AbstractEndpoint.setupFlexClient(String)


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

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/BaseHTTPEndpoint.html