I am writing a java application where a change in Salesforce Account should hit my java application through Streaming API.I gone through various articles and I found it can be achieved through Emp connector and CometD protocol.I wanted to implement with API and normal HTTP methods without including cometD libraries.How can I do it.
You can't currently1. The Bayeux protocal via CometD is the only push technology currently supported by Salesforce for the Streaming API.
Long polling, also called Comet programming, allows emulation of an information push from a server to a client. Similar to a normal poll, the client connects and requests information from the server. However, instead of sending an empty response if information isn't available, the server holds the request and waits until information is available (an event occurs). The server then sends a complete response to the client. The client then immediately re-requests information. The client continually maintains a connection to the server, so it’s always waiting to receive a response. In the case of server timeouts, the client connects again and starts over.
- 1 - Can't might not be the right term here. Technically you could re-implement CometD from the ground up yourself. And if you are lucky/skilled you'll end up with something much like the current CometD library.