use of com.tvd12.ezyfoxserver.client.handler in project calabash by youngmonkeys.
the class LocalBaseTest method newBeanContext.
protected EzyBeanContext newBeanContext() {
MongoClient mongoClient = newMongoClient();
EzyBeanContextBuilder builder = EzyBeanContext.builder().addSingleton("mongoClient", mongoClient).scan("com.tvd12.calabash.local.test.mappersist");
addAutoImplMongoRepo(builder, mongoClient);
return builder.build();
}
use of com.tvd12.ezyfoxserver.client.handler in project ezyfox-examples by tvd12.
the class EzyFoxBeanExample method main.
public static void main(String[] args) {
final EzyBeanContext beanContext = EzyBeanContext.builder().scan("com.tvd12.ezyfox.example.bean").build();
final BookController bookController = (BookController) beanContext.getBean(BookController.class);
bookController.saveBook(new Book(1L, "EzyFox in action"));
}
use of com.tvd12.ezyfoxserver.client.handler in project ezyfox-examples by tvd12.
the class MsgpackExample method main.
public static void main(String[] args) {
final EzyBindingContext bindingContext = EzyBindingContext.builder().scan("com.tvd12.ezyfox.example.msgpack").build();
final EzyEntityCodec codec = EzyBindingEntityCodec.builder().marshaller(bindingContext.newMarshaller()).unmarshaller(bindingContext.newUnmarshaller()).messageSerializer(new MsgPackSimpleSerializer()).messageDeserializer(new MsgPackSimpleDeserializer()).build();
final Transfer transfer = new Transfer(300, 100);
final byte[] serializedBytes = codec.serialize(transfer);
System.out.println(serializedBytes.length);
System.out.println(Arrays.toString(serializedBytes));
System.out.println(EzyPrints.printHex(serializedBytes));
final Transfer deserializedObj = codec.deserialize(serializedBytes, Transfer.class);
System.out.println(deserializedObj);
}
use of com.tvd12.ezyfoxserver.client.handler in project ezyfox-examples by tvd12.
the class HellWorldRpcServerExample method main.
public static void main(String[] args) throws Exception {
RpcRequestHandlerImplementer.setDebug(true);
QuickRpcSettings settings = QuickRpcSettings.builder().username("admin").password("admin").build();
QuickRpcServer server = new QuickRpcServer(settings).scan("com.tvd12.quick.rpc.examples.hello_world");
server.start();
}
Aggregations