## org.red5.server.net.remoting
Class FlexMessagingService

    java.lang.Object
      org.red5.server.net.remoting.FlexMessagingService

    public class FlexMessagingService

extends Object

Service that can execute compatibility Flex messages.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de), Paul Gregoire (mondain@gmail.com)

Field Summary
`protected Map<String,Object>` `endpoints` Configured endpoints.
`protected static Logger` `log` Logger
`protected ConcurrentMap<String,ServiceAdapter>` `registrations` Registered clients.
`static String` `SERVICE_NAME` Name of the service.
`protected IServiceInvoker` `serviceInvoker` Service invoker to use.

Constructor Summary
`FlexMessagingService()`

Method Summary
`Message` `handleRequest(AbstractMessage msg)` Fallback method to handle arbitrary messages.
`Message` `handleRequest(CommandMessage msg)` Handle command message request.
`Message` `handleRequest(CommandMessageExt msg)` Handle command message (external) request.
`AsyncMessage` `handleRequest(DataMessage msg)` Handle messages related to shared objects.
`AsyncMessage` `handleRequest(RemotingMessage msg)` Handle request coming from `mx:RemoteObject` tags.
`static ErrorMessage` `returnError(AbstractMessage request, String faultCode, String faultString, String faultDetail)` Construct error message.
`static ErrorMessage` `returnError(AbstractMessage request, String faultCode, String faultString, Throwable error)` Construct error message from exception.
`void` `setEndpoints(Map<String,Object> endpoints)` Setup available end points.
`void` `setServiceInvoker(IServiceInvoker serviceInvoker)` Set the service invoker to use.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SERVICE_NAME

    public static final String SERVICE_NAME

  Name of the service.

  See Also:
    Constant Field Values

### log

    protected static Logger log

  Logger

### serviceInvoker

    protected IServiceInvoker serviceInvoker

  Service invoker to use.

### endpoints

    protected Map<String,Object> endpoints

  Configured endpoints.

### registrations

    protected ConcurrentMap<String,ServiceAdapter> registrations

  Registered clients.

Constructor Detail

### FlexMessagingService

    public FlexMessagingService()

Method Detail

### setEndpoints

    public void setEndpoints(Map<String,Object> endpoints)

  Setup available end points.

  Parameters:
    `endpoints` - end points

### setServiceInvoker

    public void setServiceInvoker(IServiceInvoker serviceInvoker)

  Set the service invoker to use.

  Parameters:
    `serviceInvoker` - service invoker

### returnError

    public static ErrorMessage returnError(AbstractMessage request,
                                           String faultCode,
                                           String faultString,
                                           String faultDetail)

  Construct error message.

  Parameters:
    `request` - request
    `faultCode` - fault code
    `faultString` - fault string
    `faultDetail` - fault detail
  Returns:
    error message

### returnError

    public static ErrorMessage returnError(AbstractMessage request,
                                           String faultCode,
                                           String faultString,
                                           Throwable error)

  Construct error message from exception.

  Parameters:
    `request` - request
    `faultCode` - fault code
    `faultString` - fautl string
    `error` - error
  Returns:
    message

### handleRequest

    public AsyncMessage handleRequest(RemotingMessage msg)

  Handle request coming from `mx:RemoteObject` tags.

  Parameters:
    `msg` - message
  Returns:
    aynsc message
  See Also:
    Adobe Livedocs (external)

### handleRequest

    public Message handleRequest(CommandMessageExt msg)

  Handle command message (external) request.

  Parameters:
    `msg` - message
  Returns:
    message

### handleRequest

    public Message handleRequest(CommandMessage msg)

  Handle command message request.

  Parameters:
    `msg` - message
  Returns:
    message

### handleRequest

    public AsyncMessage handleRequest(DataMessage msg)

  Handle messages related to shared objects.

  Parameters:
    `msg` - message
  Returns:
    async message

### handleRequest

    public Message handleRequest(AbstractMessage msg)

  Fallback method to handle arbitrary messages.

  Parameters:
    `msg` - message
  Returns:
    error message

Copyright © 2006-2010 The Red5 Project