As best as I can tell, the options for communication between Flex and Java using BlazeDS are as follows:
Use RemoteObject in Flex to send a message (RPC) from Flex to Java, and get a reply via an asynchronous callback. On the Java side this constructs a new object for each such message.
Use Consumer in Flex to listen for inbound messages. These can come from other Flex clients (Producer) or from a Java server (using AsyncMessage and MessageBroker).
Use Producer in Flex to send messages to other Flex clients.
Did I miss any options?
Am I correct that Producer cannot be used to send a message to Java? If this is not correct, a link to an example of the Java code required would be greatly appreciated.
With the new 4.6 version of Adobe Data Services, you can also create Java (desktop/Android) and JS/ObjectiveC applications that can communicate with a messaging destination.
I should have also noted in my original post that in the RemoteObject case you can use application scope (in remoting-config.xml) to make the Java Object stateful, in which case it is only constructed once at startup, not with each RPC call.
You also have an option to communicate to a HTTPService (e.g. Java servlet) and WebService (e.g that exposed by JAX-WS) from Flex by way of a destination declared in BlazeDS. Take a look at the documentation for how to do it.
Europe, Middle East and Africa