Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ram nodebox/sockets 4 #429

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

TechArtistG
Copy link

Hi! This is my first pull request and I'm a git noob so bear with me. It's also my first Java project.
Main change is for various upgrades the project is now on Java 8

Most of the changes are in:
nodebox/src/main/java/nodebox/network/
This is where all the WebSocket code is. WebSocketMessaging.java is for static access from graph nodes. Each open document has an instance of webSocketClientEndpoint.java for commands etc.

I've added some docs here:
nodebox/src/main/java/nodebox/network/README.md

And all the messaging strings are defined here:
nodebox/src/main/java/nodebox/network/WSDefs.java

Added the new nodes and JSON functions here:
nodebox/src/main/java/nodebox/function/NetworkFunctions.java

Various threading fixes, added logic to enable sockets
nodebox/src/main/java/nodebox/client/NodeBoxDocument.java

Added logic to enable sockets
nodebox/src/main/java/nodebox/client/Application.java

@@ -1,8 +1,18 @@
package nodebox.function;

import com.sun.org.apache.xerces.internal.impl.dv.xs.BooleanDV;
import com.sun.org.apache.xpath.internal.operations.Bool;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two imports use proprietary, internal code. I don't think you use them inside of the code. Remove?

*/

@ClientEndpoint
public class webSocketClientEndpoint {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes should start with a capital letter (e.g. WebSocketClientEndpoint)

public Session call() throws Exception {
try {
WebSocketContainer container = ContainerProvider.getWebSocketContainer();
return(container.connectToServer(annotatedEndpointInstance, uri));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes the code to fail compiling. This is the error I get:

webSocketClientEndpoint.java:45: error: local variable annotatedEndpointInstance is accessed from within inner class; needs to be declared final
    [javac]                     return(container.connectToServer(annotatedEndpointInstance, uri));

@fdb
Copy link
Member

fdb commented Dec 23, 2016

Thanks for the PR. However, I couldn't get it to compile -- see the inline notes for more details (this is on Linux with OpenJDK 8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants