any API for to implement web-sockets in java [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have a requirement to do a web based interactive application in which server could push data in to the clients(web browser , android phone or JME phone). I have suggested to use Websockets rather than reverse ajax. Is there any nice framework for java to implement websockets. Please suggest.

The following very similar sounding Java servers / frameworks have web socket support:
Jetty
Netty
Note that web sockets aren't universally supported as a result of security issues (and because Microsoft doesn't want to).
You could also consider looking at some of the JMS providers that provide JMS to web sockets e.g. HornetQ and ActiveMQ using Stomp.

No need, Java has it's own very intuitive socket library.
api: http://download.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html
tutorial: http://download.oracle.com/javase/tutorial/networking/sockets/

Grizzly also has websockets support for what it's worth. But one reason to use websockets rather than java.net.Socket is that websockets can traverse firewalls and proxies transparently without having to reconfigure network ports/policies.

Related

Java HTTP/2 client implementations without ALPN [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
There is a list of Java HTTP/2 client implementations. I've found Jetty, Netty and OkHttp code examples and seems like they all need to include specific version of ALPN library depending on jdk installed. I don't like it because it makes troubles when you are not the only developer on the project.
I need to query https urls. The question is: are there any HTTP/2 client implementations that don't use ALPN? Working code examples are welcome. Thank you!
OkHttp works without any special alpn-boot jars on Java 9 beta, this is automatic. In future OkHttp could hopefully also support https://github.com/google/conscrypt.
I believe both Jetty and Netty support HTTP/2 prior knowledge (without NPN/ALPN).
e.g. Jetty
https://github.com/eclipse/jetty.project/blob/0c8273f2ca1f9bf2064cd9c4c939d2546443f759/jetty-http2/http2-http-client-transport/src/test/java/org/eclipse/jetty/http2/client/http/DirectHTTP2OverTLSTest.java#L86
HttpClientTransportOverHTTP2 transport = new HttpClientTransportOverHTTP2(new HTTP2Client());
transport.setUseALPN(false);
client = new HttpClient(transport, newSslContextFactory());
I believe for Netty it works if you use HttpToHttp2ConnectionHandler

Chat server plugin API for J2EE web application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I need to build a Mobile App (iOS, Android, Windows all) that has a chat functionality. Registered users can chat among themselves. At back-end, there is a J2EE based web application (web-services) to which Mobile-Apps talk (SOA/REST).
How can I plugin a Chat Server application into the web application, to which all mobile apps can connect ? Please suggest if there are any API available.
Here are some of the APIs and RTC Applications that one can explore.
Atmosphere - Open-source, JSF
JWebSocket - Open-source, Java/JavaScript based, HTML5 WebSocket
OpenFire - Open-source, XMPP Protocol
If you are looking for framework that would help you integrating a chat functionality so there is some known Framwork like PrimeFaces which is Component based Framework for web and mobile application based on top of JSF , it include the chat feature ,it use inside the Atmosphere framework for realtime communication between client and server . check this Primefaces demo.

Looking for Java server library/framework for server management interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am relatively new to Java and have developed a Java server application that receives small pieces of mass data in a proprietary protocol via TCP from many clients on the internet, sends it to a Postgres database (JDBC) and communicates with other modules using sockets, too.
So far I am using Java NIO for socket I/O and slf4j/logback for logging, apart from that only standard Java stuff.
Now I need to implement the administration stuff that every professional server application needs, e.g. switching logging on and off with fine granularity, make the server reread its configuration, shut the server down cleanly, reset client connections, get usage statistics, etc.
So I'll need to implement some administration interface using Sockets and design some communications protocol, etc. or something like that.
This is such a common task in creation of server apps that I thing someone must have had the idea before to create libraries for this.
Are there any common frameworks for such tasks either in the Java Standard Libraries or from other sources that you can recommend?
The library must be able to run on Linux and Mac OS X and must be Open Source, license preferrably BSD-style or similar.
Bye, Matthias
Maybe you can use JMX and JConsole to do it. Expose your server components as MBeans and grant write access.

Remote Handling PLC using Web based java application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
we are developing an simulator application where user can create simulation and run the logic. now in second phase of our project we required hardware triggering using web based application . i required some information on how i am going to interact with PLC machine using my java code we are using modbus serial communication but can be changed if you have some other better solution. as par my research we have seen OPC server but i didn't get anything from that. i want some one can help me to understand what will be flow. how to proceed with this. do i have to write driver for communicating with my application and PLC.
What need to be done complete approach this task. if you have any link please share
thank you
I don't know if this is helpful for you, but we have a java library (LGPL 3.0) which talks natively via TCP/IP with S7 devices.
have a look at http://openscada.org
we also have a OPC interface which is written in plain JAVA, no Windows required.
I use this.
http://www.modbusdriver.com/shop/index.php?cPath=0_42
It is cheap, and the examples and support are good. Their support is out of Australia, though, so you will either be answered at 6:00 at night or while you're asleep.

How to connect to JMX agent using python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am working on custom monitoring system to my server.
the application is developed using python and Django.
The server is running java web applications and I need to monitor the JVM under which the application server is running, so I start the applications with enable the JMX.
Now I need to connect my python application to the JVM JMX agent.
Is there any way to get that?
I have read about the HtmlAdapterServer, that enable managing JMX MBeans from specific url but I do not know how can I use it?
Thanks in advance and best regards
How about using Jython ? http://www.jython.org/
There is a reference implementation of a WebServices based JMXServer you can deploy on your server. Based on the docs, it is possible to use VB Scripting to invoke JMX operations, so I would assume you could use Python too.
Update:
Jolokia provides an HTTP/REST API to access JMX MBeanServers. This should be easily invoked by a python client.
Jpype is another option. Start jvm and code java to retrieve glassfish monitoring data. http://jpype.sourceforge.net/

Categories

Resources