dejanmr
dejanmr

Reputation: 47

Start new tcpclient, on new ip address, in runtime with spring integration?

I have tcp client, serializer and deserializer set up, and I communicate to server of interest, which is ptz camera. But, i have server address and port predefined in client factory configuration.

I have scenario where I need to add new camera (acting as tcp server) to system in runtime, and start new tcp client to control it. Camera would be of known type, and use existing serializer.

Is it possible to do it using spring integration? Some reference/sample could help.

I know how to do it using Socket class directly, but I like the power spring integration gives me.

Upvotes: 0

Views: 199

Answers (1)

Gary Russell
Gary Russell

Reputation: 174494

Please see the dynamic-ftp sample; you can use the same technique for tcp.

In essence, the new beans go in a new application context which is configured with properties.

The same applies if you are using Java configuration rather than XML.

Upvotes: 1

Related Questions