Publisher/Subscriber design model

I'm trying to create a nice GUI that sends commands to an object (that then formats and sends them over a socket to a server). The GUI also has to be able to receive the results of those commands at any random time. In other words, I need to be able to send a command and be notified later when the command result is ready. What's a good model for this?

[376 byte] By [jayhawkstew] at [2007-9-30 9:04:06]
# 1
RMI, because then you don't have to muss about formatting and parsing messages to execute a command, you just call it by name...Andrew
awaddi at 2007-7-2 21:00:18 > top of Java-index,Other Topics,Patterns & OO Design...