Jump to content

Ports and threading model

Recommended Posts

Hi, I have been using the Java API successfully for a while, but I have a few questions. Apologies if the information is available elsewhere, but I haven't really been able to find any real documentation.


Which port does the API communicate to your servers through? I'll be moving my app to new machine shortly and need to configure the firewall.


What is the threading model used? Specifically, for the following handlers:

- DetailsRequestHandler

- PageRequestHandler

- CommandReceivedHandler

- PageCommandReceivedHandler


Are they guaranteed to be called by a single thread only or do I need to handle my own synchronization or make them safe for reentry (note that I have a single object that implements all these interfaces)?


Finally, I use the android client app, and I get repeated "instance is offline" notifications on instance failure, instead of just one. I'm not sure if the notification delete function on the android app is not working, or if I'm receiving multiple notifications. I presume the latter. Is there any way to configure the API to only send a single notification?




Link to post
Share on other sites
  • Staff



The only port you have to allow out through your firewall is 443 for the following hosts ws0 ....ws19 .pulseway.com.

To answer your second question, each Handler is called on it's own thread... so you should handle your own synchronization.

Link to post
Share on other sites

Hi Calin,


Many thanks for the quick response. To clarify, is the following correct?


- Each of these four handlers is called by an independent thread

- Two of more of the handlers may be executing concurrently

- Each handler will only be called by a single thread at a time


So the handlers need to safe with respect to any shared data structures, but don't need to be reentrant.




Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...