Giter Site home page Giter Site logo

jstp-java's People

Contributors

lidaamber avatar lundibundi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jstp-java's Issues

Create EventHandler annotation for Proxy methods

We should add an @EventHandler annotation for Proxy methods to process incoming events in the way like this:

@EventHandler
void onSomeEvent(List<?> args);
@EventHandler("eventName")
void onSomeEvent(List<?> args);
@EventHandler({"interfaceName", "eventName"})
void onSomeEvent(List<?> args);

With this annotation the generated class for Proxy should be abstract, so that the User'll later implement handlers for methods with @EventHandler annotation.

Create CallHandler annotation for Proxy methods

We should add a @CallHandler annotation for Proxy methods to process incoming calls in the way like this:

@CallHandler
void onMethodCalled(List<?> args);
@CallHandler("methodName")
void onMethodCalled(List<?> args);
@CallHandler({"interfaceName", "methodName"})
void onMethodCalled(List<?> args);

With this annotation the generated class for Proxy should be abstract, so that the User'll later implement handlers for methods with @CallHandler annotation.

Empty app name on first connect

With current implementation it is possible to call connect with no name but there are no checks for empty internal app name which will in turn lead to sending nothing instead of app name.

This should easily be checked in onConnected()

Executable handler requires "message" instead of "internal message"

Creating a handler like this:

@Handler(ExecutableHandler.class)
public interface OkErrorHandler {

    @NotNull
    @Object("ok")
    void onOk(List<?> args);

    @NotNull
    @Object("error")
    void onError(@Array(0) Integer errorCode);
}

leads to problems with handler, because run() method requires message, but internalMessage is created instead (generated code fragment):

@Override
public void run() {
    handleOnOk(internalMessage);
    handleOnError(internalMessage);
}

Send handshake automatically after useTransport

As of now you need to call handshake manually if you change transport to the one that has already been connected, hence it'd be better to check that and send handshake if transport is already connected.

This should be easily done in useTransport method.

Queued packet handling upon transport change

When you call connection.useTransport to change underlying transport there is no policy applied to the packages that already are in the queue, it must be defined what's going to happen to them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.