Packageflex.messaging.endpoints
Classpublic class AbstractEndpoint
InheritanceAbstractEndpoint Inheritance ManageableComponent

This is the default implementation of Endpoint, which provides a convenient base for behavior and associations common to all endpoints. These properties that show up in endpoint configuration are only used by the client, therefore they have to be set on the appropriate client classes: connect-timeout-seconds set on Channel.

See also

Endpoint


Public Methods
 MethodDefined By
  
Constructs an unmanaged AbstractEndpoint.
AbstractEndpoint
  
AbstractEndpoint(boolean enableManagement)
Constructs an AbstractEndpoint with the indicated management.
AbstractEndpoint
  
Returns a ConfigMap of endpoint properties that the client needs.
AbstractEndpoint
  
String getClientType()
Returns the corresponding client channel type for the endpoint.
AbstractEndpoint
 Inherited
  
Returns the FlexClientOutboundQueueProcessorClass of the endpoint.
AbstractEndpoint
  
Returns the properties for the FlexClientOutboundQueueProcessor of the endpoint.
AbstractEndpoint
 Inherited
String getId()
Returns the id of the ManageableComponent.
  
Returns the MessageBroker of the AbstractEndpoint.
AbstractEndpoint
  
AbstractEndpoint
 Inherited
Returns the parent of the component.
  
int getPort()
Returns the port of the url of the endpoint.
AbstractEndpoint
  
Returns the SecurityConstraint of the Endpoint.
AbstractEndpoint
  
Returns the SerializationContext of the endpoint.
AbstractEndpoint
  
Returns the that the endpoint is using; null if no server has been assigned.
AbstractEndpoint
  
Returns the TypeMarshaller of the endpoint.
AbstractEndpoint
  
String getUrl()
Returns the url of the endpoint.
AbstractEndpoint
  
void initialize(String id, ConfigMap properties)
Initializes the Endpoint with the properties.
AbstractEndpoint
 Inherited
boolean isManaged()
  
boolean isSecure()
Determines whether the endpoint is secure or not.
AbstractEndpoint
 Inherited
boolean isStarted()
Returns if the component is started or not.
 Inherited
boolean isValid()
Returns if the component is valid.
  
void service(HttpServletRequest req, HttpServletResponse res)
Default implementation of the Endpoint service method.
AbstractEndpoint
  
Typically invoked by subclasses, this method transforms decoded message data into the appropriate Message object and routes the Message to the endpoint's broker.
AbstractEndpoint
  
void setClientType(String type)
Sets the corresponding client channel type for the endpoint.
AbstractEndpoint
 Inherited
void setControl(BaseControl control)
  
void setFlexClientOutboundQueueProcessorClass(Class flexClientOutboundQueueProcessorClass)
Sets the the FlexClientOutboundQueueProcessor of the endpoint.
AbstractEndpoint
  
void setFlexClientOutboundQueueProcessorConfig(ConfigMap flexClientOutboundQueueProcessorConfig)
Sets the properties for the FlexClientOutboundQueueProcessor of the endpoint.
AbstractEndpoint
  
void setId(String id)
Sets the id of the AbstractEndpoint.
AbstractEndpoint
 Inherited
void setManaged(boolean enableManagement)
Enables or disables management for the component.
  
Sets the MessageBroker of the AbstractEndpoint.
AbstractEndpoint
 Inherited
void setParent(Manageable parent)
Sets the parent of the component.
  
void setSecurityConstraint(SecurityConstraint securityConstraint)
Sets the SecurityConstraint of the Endpoint.
AbstractEndpoint
  
Sets the SerializationContext of the endpoint.
AbstractEndpoint
  
void setServer(Server server)
Sets the that the endpoint will use.
AbstractEndpoint
  
void setTypeMarshaller(TypeMarshaller typeMarshaller)
Sets the TypeMarshaller of the endpoint.
AbstractEndpoint
  
Utility method that endpoint implementations (or associated classes) should invoke when they receive an incoming message from a client but before servicing it.
AbstractEndpoint
  
Utility method that endpoint implementations (or associated classes) should invoke when they receive an incoming message from a client but before servicing it.
AbstractEndpoint
  
void setUrl(String url)
Sets the url of the endpoint.
AbstractEndpoint
  
void start()
Starts the endpoint if its associated MessageBroker is started, and if the endpoint is not already running.
AbstractEndpoint
  
void stop()
Stops the endpoint if it's running.
AbstractEndpoint
Public Constants
 ConstantDefined By
  LOG_CATEGORY
[static] Log category for AbstractEndpoint.
AbstractEndpoint
Constructor Detail
AbstractEndpoint()
public AbstractEndpoint()

Constructs an unmanaged AbstractEndpoint.

AbstractEndpoint() 
public AbstractEndpoint(boolean enableManagement)

Constructs an AbstractEndpoint with the indicated management.

Parameters
enableManagementtrue if the AbstractEndpoint is manageable; otherwise false.
Method Detail
describeEndpoint()
public ConfigMap describeEndpoint()

Returns a ConfigMap of endpoint properties that the client needs. By default, it returns a ConfigMap of endpoint id under "id" key, endpoint client type under "type" key and endpoint url under "uri" key. It also positive connectTimeoutSecond under "connect-timeout-seconds" key, Subclasses should add additional properties to super.describeDestination, or return null if they don't want their properties to be sent to the client.

Returns
getClientType() 
public String getClientType()

Returns the corresponding client channel type for the endpoint.

Returns
The corresponding client channel type for the endpoint.
getFlexClientOutboundQueueProcessorClass() 
public Class getFlexClientOutboundQueueProcessorClass()

Returns the FlexClientOutboundQueueProcessorClass of the endpoint.

Returns
The FlexClientOutboundQueueProcessorClass of the endpoint.
getFlexClientOutboundQueueProcessorConfig() 
public ConfigMap getFlexClientOutboundQueueProcessorConfig()

Returns the properties for the FlexClientOutboundQueueProcessor of the endpoint.

Returns
The properties for the FlexClientOutboundQueueProcessor of the endpoint.
getMessageBroker() 
public MessageBroker getMessageBroker()

Returns the MessageBroker of the AbstractEndpoint.

Returns
MessageBroker of the AbstractEndpoint.
getMessagingVersion() 
public double getMessagingVersion()

Returns
the highest messaging version currently available via this endpoint.
getPort() 
public int getPort()

Returns the port of the url of the endpoint. A return value of 0 denotes no port in channel url.

Returns
The port of the url of the endpoint or 0 if url does not contain a port number.
getSecurityConstraint() 
public SecurityConstraint getSecurityConstraint()

Returns the SecurityConstraint of the Endpoint.

Returns
The SecurityConstraint of the Endpoint.
getSerializationContext() 
public SerializationContext getSerializationContext()

Returns the SerializationContext of the endpoint.

Returns
The SerializationContext of the endpoint.
getServer() 
public Server getServer()

Returns the that the endpoint is using; null if no server has been assigned.

Returns
getTypeMarshaller() 
public TypeMarshaller getTypeMarshaller()

Returns the TypeMarshaller of the endpoint.

Returns
The TypeMarshaller of the endpoint.
getUrl() 
public String getUrl()

Returns the url of the endpoint.

Returns
The url of the endpoint.
initialize() 
public void initialize(String id, ConfigMap properties)

Initializes the Endpoint with the properties. If subclasses override, they must call super.initialize().

Parameters

id — Id of the Endpoint.
 
properties — Properties for the Endpoint.

isSecure() 
public boolean isSecure()

Determines whether the endpoint is secure or not.

Returns
false by default.
service() 
public void service(HttpServletRequest req, HttpServletResponse res)

Default implementation of the Endpoint service method. Subclasses should call super.service before their custom code.

Parameters

req
 
res

serviceMessage() 
public Message serviceMessage(Message message)

Typically invoked by subclasses, this method transforms decoded message data into the appropriate Message object and routes the Message to the endpoint's broker.

Parameters

message

Returns
setClientType() 
public void setClientType(String type)

Sets the corresponding client channel type for the endpoint.

Parameters

type — The corresponding client channel type for the endpoint.

setFlexClientOutboundQueueProcessorClass() 
public void setFlexClientOutboundQueueProcessorClass(Class flexClientOutboundQueueProcessorClass)

Sets the the FlexClientOutboundQueueProcessor of the endpoint.

Parameters

flexClientOutboundQueueProcessorClass

setFlexClientOutboundQueueProcessorConfig() 
public void setFlexClientOutboundQueueProcessorConfig(ConfigMap flexClientOutboundQueueProcessorConfig)

Sets the properties for the FlexClientOutboundQueueProcessor of the endpoint.

Parameters

flexClientOutboundQueueProcessorConfig

setId() 
public void setId(String id)

Sets the id of the AbstractEndpoint. If the AbstractEndpoint has a MessageBroker assigned, it also updates the id in the MessageBroker.

Parameters

id

setMessageBroker() 
public void setMessageBroker(MessageBroker broker)

Sets the MessageBroker of the AbstractEndpoint. Removes the AbstractEndpoint from the old broker (if there was one) and adds to the list of endpoints in the new broker.

Parameters

brokerMessageBroker of the AbstractEndpoint.

setSecurityConstraint() 
public void setSecurityConstraint(SecurityConstraint securityConstraint)

Sets the SecurityConstraint of the Endpoint.

Parameters

securityConstraint

setSerializationContext() 
public void setSerializationContext(SerializationContext serializationContext)

Sets the SerializationContext of the endpoint.

Parameters

serializationContext

setServer() 
public void setServer(Server server)

Sets the that the endpoint will use.

Parameters

server

setTypeMarshaller() 
public void setTypeMarshaller(TypeMarshaller typeMarshaller)

Sets the TypeMarshaller of the endpoint.

Parameters

typeMarshaller

setupFlexClient() 
public FlexClient setupFlexClient(Message message)

Utility method that endpoint implementations (or associated classes) should invoke when they receive an incoming message from a client but before servicing it. This method looks up or creates the proper FlexClient instance based upon the client the message came from and places it in the FlexContext.

Parameters

message — The incoming message to process.

Returns
The FlexClient or null if the message did not contain a FlexClient id value.
setupFlexClient() 
public FlexClient setupFlexClient(String id)

Utility method that endpoint implementations (or associated classes) should invoke when they receive an incoming message from a client but before servicing it. This method looks up or creates the proper FlexClient instance based upon the FlexClient id value received from the client. It also associates this FlexClient instance with the current FlexSession.

Parameters

id — The FlexClient id value from the client.

Returns
The FlexClient or null if the provided id was null.
setUrl() 
public void setUrl(String url)

Sets the url of the endpoint.

Parameters

url

start() 
public void start()

Starts the endpoint if its associated MessageBroker is started, and if the endpoint is not already running. If subclasses override, they must call super.start().

stop() 
public void stop()

Stops the endpoint if it's running. If subclasses override, they must call super.stop().

Constant Detail
LOG_CATEGORYConstant
public static final LOG_CATEGORY

Log category for AbstractEndpoint.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/flex/messaging/endpoints/AbstractEndpoint.html