Handling TServer responses in Java

Hi,

I am very curious about how to handle TServer responses in Java.

I have noticed that each command gets a reply right away.
Is it the correct way to program?
I am concerned that by waiting for response significantly slows down the system.

Message request =
RequestRegisterAddress.create(
“2700”, //DN
RegisterMode.ModeShare,
ControlMode.RegisterDefault,
AddressType.DN
);

Message response = protocol.request(request);

if(response.messageId() != EventRegistered.ID)
{
throw new Exception(“Unexpected response to RequestRegisterAddress”);
}

I am thinking about building a proxy for TServer, thus the need to issue more than one request regardless of whether or not we got a reply. Can this be done with Java? Or do I need to open a new connection for each new DN??? This would really be worst possible thing to do.

Isn’t there a way to implement some sort of callback function instead? Like we used to have in ActiveX version?

Thanks,
Vic

2 Likes

Vic,
please tell me if you figure it out!

Sanja Kulku
Technical Product Manager