让java和flash互相交谈

时间:2021-12-27 14:04:29

I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going about this. I suppose I could open a socket between the two programs, but I feel that there must be an easier way. Is there a nice part of the api in actionscript 3.0 that will allow me to access java methods directly, or will I have to resort to sockets? I am relatively new to flash, by the way, so any good guides would be much appreciated!

我有一个用java编写的应用程序,我想为它添加一个flash前端。闪存前端将与独立闪存播放器中的Java应用程序在同一台计算机上运行。我需要在两个部分之间进行双向沟通,并且不知道如何开始这样做。我想我可以在两个程序之间打开一个套接字,但我觉得必须有一个更简单的方法。在actionscript 3.0中有一个很好的部分可以让我直接访问java方法,还是我不得不求助于套接字?顺便说一句,我对flash来说比较新,所以任何优秀的导游都会非常感激!

Thanks

5 个解决方案

#1


6  

AMF is a messaging protocol commonly used to talk between flash and a backend system. There're several Java implementations, but I haven't used any of them so can't tell you which is best.

AMF是一种消息传递协议,通常用于在闪存和后端系统之间进行通信。有几个Java实现,但我没有使用它们中的任何一个,所以不能告诉你哪个是最好的。

Flash can also talk plain old XML, SOAP or REST to the backend, so depending on your codebase that might be easier.

Flash还可以将简单的旧XML,SOAP或REST与后端对话,因此根据您的代码库可能更容易。

#2


2  

There is also OpenAMF. It is very mature, stable, simple and lightweight relative to Blaze, Red5 and Granite.

还有OpenAMF。相对于Blaze,Red5和Granite,它非常成熟,稳定,简单和轻盈。

BUT, it is also dated (AMF0 protocol only) and the project is no longer active. Lots of people are still using it out in the wild. And the documentation is borderline non-existent.

但是,它也是过时的(仅限AMF0协议),项目不再有效。很多人仍然在野外使用它。文档是边缘不存在的。

#3


1  

Granite DS is a good solution, it will allow you to set up services to communicate not only to POJO's but to EJB3 session beans also. It comes with a GAS code generator for converting your java beans into as3 equivalents and also data push to the client using the gravity side project.

Granite DS是一个很好的解决方案,它允许您设置服务,不仅可以与POJO通信,还可以与EJB3会话bean通信。它附带了一个GAS代码生成器,用于将java bean转换为as3等效项,并使用重力项目将数据推送到客户端。

#4


0  

MERAPI is a bridge framework for communication between Java and Flash.

MERAPI是Java和Flash之间通信的桥接框架。

#5


0  

I agree on Granite DS. It was easy to setup and get going.

我同意Granite DS。这很容易设置和开始。

I have used it to talk directly with a EJB3 bean communicating with thrift generated objects.

我用它来直接与EJB3 bean通信,并与thrift生成的对象进行通信。

#1


6  

AMF is a messaging protocol commonly used to talk between flash and a backend system. There're several Java implementations, but I haven't used any of them so can't tell you which is best.

AMF是一种消息传递协议,通常用于在闪存和后端系统之间进行通信。有几个Java实现,但我没有使用它们中的任何一个,所以不能告诉你哪个是最好的。

Flash can also talk plain old XML, SOAP or REST to the backend, so depending on your codebase that might be easier.

Flash还可以将简单的旧XML,SOAP或REST与后端对话,因此根据您的代码库可能更容易。

#2


2  

There is also OpenAMF. It is very mature, stable, simple and lightweight relative to Blaze, Red5 and Granite.

还有OpenAMF。相对于Blaze,Red5和Granite,它非常成熟,稳定,简单和轻盈。

BUT, it is also dated (AMF0 protocol only) and the project is no longer active. Lots of people are still using it out in the wild. And the documentation is borderline non-existent.

但是,它也是过时的(仅限AMF0协议),项目不再有效。很多人仍然在野外使用它。文档是边缘不存在的。

#3


1  

Granite DS is a good solution, it will allow you to set up services to communicate not only to POJO's but to EJB3 session beans also. It comes with a GAS code generator for converting your java beans into as3 equivalents and also data push to the client using the gravity side project.

Granite DS是一个很好的解决方案,它允许您设置服务,不仅可以与POJO通信,还可以与EJB3会话bean通信。它附带了一个GAS代码生成器,用于将java bean转换为as3等效项,并使用重力项目将数据推送到客户端。

#4


0  

MERAPI is a bridge framework for communication between Java and Flash.

MERAPI是Java和Flash之间通信的桥接框架。

#5


0  

I agree on Granite DS. It was easy to setup and get going.

我同意Granite DS。这很容易设置和开始。

I have used it to talk directly with a EJB3 bean communicating with thrift generated objects.

我用它来直接与EJB3 bean通信,并与thrift生成的对象进行通信。