hello i use the swing write the client-side console,but this client side console fuction not as normal,it don't receive info ACTIVATELY, it works as a monitor to superwise other computer(i call it server),the server push data to the client-side console,that means the swing client PASSIVATELY get info,one info item arrived,the one item is displayed on a table within the client console. who can tell me,what's the better solution to my requirement,socket or rmi?and how? thank you very much!
If the server is also written in Java, then it's probably easier to do this in RMI... RMI hides a lot of the low level socket IO and serialization issues that you would have to deal with if you just used just sockets, and it handles situations where the IP address of the server may not always be the same. If, however, you aren't sure if the server is going to be written in Java, then sockets are a better choice.
Even though your client is written in Swing, this question has more to do with the RMI/sockets question, and this post should probably be moved to the 'Distributed Java' forum.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?