metarhia / jstp-java Goto Github PK
View Code? Open in Web Editor NEWJSTP implementation in java
Home Page: https://metarhia.com
License: Other
JSTP implementation in java
Home Page: https://metarhia.com
License: Other
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.
Add delegated methods addEventHandler
and setCallHandler
from Connection
to class generated with @Proxy
to avoid unneded interactions with the Connection intelf.
Introduced in 8aee294.
This error must be local and must not be sent over the connection, thus the negative code value.
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.
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()
Introduced in 939cad3.
As it stated in title, It'd be better to allow users to choose thread for callbacks (for all ManualHandlers, EventHandlers etc)
If no method-wide getter is specified jstp-compiler will get value under second key of object and use it as a base. This is not reflected in readme.
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);
}
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.