I don't need 'real time' as in inflight-control of aircraft etc
USB serial port delays are OK.
What I'm getting at is that the program logic needs to be running in the host computer, with most of the time the Arduino just acting as a 'smart peripheral'. The host will decide which pins to take high / low, etc, the host will need to know the pin states, and analog input voltages.
So what I'm looking for is, effectively, some means of providing to a host Java program the equivalent APIs to pinMode(), digitalRead(), digitalWrite(), analogRead(), analogWrite() with all the parameters decided by the host Java program and each API call be transmitted along the Serial link. The Arduino would have 'slave' software which would implement the instruction received from the host and send a response.
There will be some additional logic needed in the Arduino itself to deal with the few really time-critical functions, e.g. 'take pin N high for M millisecs then low again' or 'keep adjusting output voltage Vo until input voltage Vi is Vref'. I would want to invoke these functions as some form of 'remote procedure call'.
I suppose all I'm really looking for is your confirmation that I've understood the Arduino architecture correctly and that this is all possible. I can do the implementation of the protocol myself - I've done similar things before over an async character-oriented connection.