Forums Register Login

Listener

+Pie Number of slices to send: Send
Hi all,

I need some help. I am writing a program to listen an alert from a server after that the alert will be do something.

May I know how can I start to do it or is there an example on alert listener for server?

Because I google and all I find is regards to event listener.

So any kind soul can help me out. Thanks
+Pie Number of slices to send: Send
Welcome to the Ranch.

You first have to find out how exactly the server sends the alert.
+Pie Number of slices to send: Send
 

Jesper de Jong wrote:Welcome to the Ranch.

You first have to find out how exactly the server sends the alert.



Thanks.

The alerts are send by the APIs according to what I have been told. And listen to a TCP/IP port example 0080. the server will send a XML data which is the alert.

So I not sure how can I start or integrate it.

I understand that the ClientListener should be a jar file which is a class file i suppose, so that I can create a new instance. And this clientlistener file it should be provided, am I right?

And this is what I have from them..



Please advice and help again. Thanks.
+Pie Number of slices to send: Send
So, you have a special API to receive those alerts? It's not part of standard Java, so I don't know that API. Ask the people who gave you the API for documentation.
+Pie Number of slices to send: Send
Question too difficult for "beginning". Moving discussion.
+Pie Number of slices to send: Send
Ok I have requested for the API.

But in the mean time, should I do the codes for listening to the port and event/alert listener too not wasting time on waiting.

So is there any direction that I can look into it because I have google quite a lot but I cant find an alert listener example to listen to a tcp/ip port.

Please advice thanks.
+Pie Number of slices to send: Send
The coding is done in java just that I need some help on how can I add an alert listener to a tcp/ip port.

I have try finding but all exampls mention only on listening to tcp/ip port.

Or am I in the wrong direction?? or the alert listener should done on the server side instead?

+Pie Number of slices to send: Send
If you need to use the API that you get from someone, then you'll need the documentation etc. and do it as is described there. It doesn't help much to try to build something that listens to a TCP/IP port, not really knowing what you are doing or if this is going to work with the specific server that you're using.

It's like you're going to build a house, but you don't have a plan yet and you want to start building immediately while not knowing at all what the house should look like.
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1128 times.
Similar Threads
implement command in alert
Alert Guage in httpConnection
JSF1.2 with Apache Tomcat 7 and jre 1.7.0 and Eclipse Indigo
Running a thread in tomcat application
implementing command on alert
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:45:04.