use of com.tvd12.ezyfoxserver.client.handler in project ezyfox-server by youngmonkeys.
the class HelloEmbeddedServer2 method main.
public static void main(String[] args) throws Exception {
EzySimpleSettings settings = new EzyEmbeddedSettingsBuilderPrototype().scan("com.tvd12.ezyfoxserver.embedded.test").build();
EzyEmbeddedServer server = EzyEmbeddedServer.builder().settings(settings).build();
server.start();
}
use of com.tvd12.ezyfoxserver.client.handler in project java-examples by tvd12.
the class ApplicationContextExample method main.
public static void main(String[] args) {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.scan("com.tvd12.example.spring_core.config");
context.scan("com.tvd12.example.spring_core.repo");
context.scan("com.tvd12.example.spring_core.service");
context.refresh();
BookService bookService = context.getBean(BookService.class);
System.out.println(bookService.getBookById(1));
Environment environment = context.getEnvironment();
String world = environment.getProperty("hello");
System.out.println(world);
}
use of com.tvd12.ezyfoxserver.client.handler in project java-examples by tvd12.
the class ReactiveExample method main.
public static void main(String[] args) {
final EzyBeanContext beanContext = EzyBeanContext.builder().scan("com.tvd12.example.reactive").build();
final RxHomeController rxHomeController = (RxHomeController) beanContext.getBean(RxHomeController.class);
final HomeData rxHomeData = rxHomeController.getHomeData();
System.out.println("rxHomeData: " + rxHomeData);
}
use of com.tvd12.ezyfoxserver.client.handler in project java-examples by tvd12.
the class PerformanceCompareTest method main.
public static void main(String[] args) {
final EzyBeanContext beanContext = EzyBeanContext.builder().scan("com.tvd12.example.reactive").build();
final HomeController sequenceHomeController = (HomeController) beanContext.getBean(HomeController.class);
final RxHomeController rxHomeController = (RxHomeController) beanContext.getBean(RxHomeController.class);
// warm up
sequenceHomeController.getHomeData();
rxHomeController.getHomeData();
long sequenceCallElapsedTime = Performance.create().loop(100000).test(sequenceHomeController::getHomeData).getTime();
long rxCallElapsedTime = Performance.create().loop(100000).test(rxHomeController::getHomeData).getTime();
System.out.printf("sequence call elapsed time: %d\nreactive call elapsed time: %d\n", sequenceCallElapsedTime, rxCallElapsedTime);
Reactive.destroy();
}
use of com.tvd12.ezyfoxserver.client.handler in project calabash by youngmonkeys.
the class LocalMapPersistExample method newEntityCodec.
protected EzyEntityCodec newEntityCodec() {
EzyBindingContext bindingContext = EzyBindingContext.builder().scan("com.tvd12.calabash.server.core.test.localmappersit").build();
EzyMessageSerializer messageSerializer = new MsgPackSimpleSerializer();
EzyMessageDeserializer messageDeserializer = new MsgPackSimpleDeserializer();
return EzyBindingEntityCodec.builder().marshaller(bindingContext.newMarshaller()).unmarshaller(bindingContext.newUnmarshaller()).messageSerializer(messageSerializer).messageDeserializer(messageDeserializer).build();
}
Aggregations