flex.messaging.endpoints
Interface Endpoint

All Superinterfaces:
Manageable
All Known Subinterfaces:
Endpoint2
All Known Implementing Classes:
AbstractEndpoint, AMFEndpoint, BaseHTTPEndpoint, BasePollingHTTPEndpoint, BaseStreamingHTTPEndpoint, HTTPEndpoint, SecureAMFEndpoint, SecureHTTPEndpoint, SecureStreamingAMFEndpoint, SecureStreamingHTTPEndpoint, StreamingAMFEndpoint, StreamingHTTPEndpoint

public interface Endpoint
extends Manageable

An endpoint receives messages from clients and decodes them, then sends them on to a MessageBroker for routing to a service. The endpoint also encodes messages and delivers them to clients. Endpoints are specific to a message format and network transport, and are defined by the named URI path on which they are located.


Method Summary
 ConfigMap describeEndpoint()
          Returns a ConfigMap of endpoint properties that the client needs.
 String getClientType()
          Returns the corresponding client channel type for the endpoint.
 String getId()
          All endpoints are referenceable by an id that is unique among all the endpoints registered to a single broker instance.
 MessageBroker getMessageBroker()
          All endpoints must be managed by a single MessageBroker, and must be capable of returning a reference to that broker.
 double getMessagingVersion()
          Returns the highest messaging version currently available via this endpoint.
 int getPort()
          Returns the port of the url of the endpoint.
 SecurityConstraint getSecurityConstraint()
          Returns the security constraint of the endpoint.
 String getUrl()
          Returns the url of the endpoint.
 void initialize(String id, ConfigMap properties)
          Initialize the endpoint with id and properties.
 boolean isSecure()
          Specifies whether this protocol requires the secure HTTPS protocol.
 boolean isStarted()
          Returns whether the endpoint is started or not.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Respond to HTTP-based messages published by a client.
 void setClientType(String clientType)
          Sets the corresponding client channel type for the endpoint.
 void setId(String id)
          All endpoints are referenceable by an id that is unique among all the endpoints registered to a single broker instance.
 void setMessageBroker(MessageBroker broker)
          Sets the MessageBroker of the endpoint.
 void setSecurityConstraint(SecurityConstraint constraint)
          Sets the security constraint of the endpoint.
 void setUrl(String url)
          Sets the url of the endpoint.
 void start()
          Start the endpoint.
 void stop()
          Stop and destroy the endpoint.
 
Methods inherited from interface flex.management.Manageable
getControl, isManaged, setControl, setManaged
 

Method Detail

initialize

void initialize(String id,
                ConfigMap properties)
Initialize the endpoint with id and properties.

Parameters:
id - The id of the endpoint.
properties - Properties of the endpoint.

start

void start()
Start the endpoint. The MethodBroker invokes this method in order to set the endpoint up for sending and receiving messages from Flash clients.


isStarted

boolean isStarted()
Returns whether the endpoint is started or not.

Returns:
true if the endpoint is started; otherwise false.

stop

void stop()
Stop and destroy the endpoint. The MethodBroker invokes this method in order to stop the endpoint from sending and receiving messages from Flash clients.


getClientType

String getClientType()
Returns the corresponding client channel type for the endpoint.

Returns:
The corresponding client channel type for the endpoint.

setClientType

void setClientType(String clientType)
Sets the corresponding client channel type for the endpoint.

Parameters:
clientType - The corresponding client channel type for the endpoint.

describeEndpoint

ConfigMap describeEndpoint()
Returns a ConfigMap of endpoint properties that the client needs.


getId

String getId()
All endpoints are referenceable by an id that is unique among all the endpoints registered to a single broker instance.


setId

void setId(String id)
All endpoints are referenceable by an id that is unique among all the endpoints registered to a single broker instance. The id is set through this method, usually through parsed configuration.


getMessageBroker

MessageBroker getMessageBroker()
All endpoints must be managed by a single MessageBroker, and must be capable of returning a reference to that broker. This broker reference is used when the endpoint wishes to send a message to one of the broker's services.

Returns:
broker The MessageBroker instance which manages this endpoint

setMessageBroker

void setMessageBroker(MessageBroker broker)
Sets the MessageBroker of the endpoint.

Parameters:
broker -

getMessagingVersion

double getMessagingVersion()
Returns the highest messaging version currently available via this endpoint.


getPort

int getPort()
Returns the port of the url of the endpoint.

Returns:
The port of the url of the endpoint.

isSecure

boolean isSecure()
Specifies whether this protocol requires the secure HTTPS protocol.


getSecurityConstraint

SecurityConstraint getSecurityConstraint()
Returns the security constraint of the endpoint.

Returns:
The security constraint of the endpoint.

setSecurityConstraint

void setSecurityConstraint(SecurityConstraint constraint)
Sets the security constraint of the endpoint.

Parameters:
constraint -

service

void service(javax.servlet.http.HttpServletRequest req,
             javax.servlet.http.HttpServletResponse res)
Respond to HTTP-based messages published by a client. Endpoints which do not support access over HTTP should throw an UnsupportedOperationException in the implementation of htis method.


getUrl

String getUrl()
Returns the url of the endpoint.

Returns:
The url of the endpoint.

setUrl

void setUrl(String url)
Sets the url of the endpoint.

Parameters:
url -


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