Search in sources :

Example 16 with NotifyHandler

use of info.xiancloud.core.NotifyHandler in project xian by happyyangyuan.

the class Demo method main.

public static void main(String[] args) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("userName", "xianUser");
    map.put("password", "xianPwd");
    Xian.call("test", "UnitResponseTestUnit", map, new NotifyHandler() {

        @Override
        protected void handle(UnitResponse unitResponse) {
            System.out.println(unitResponse.toVoJSONString());
        }
    });
}
Also used : HashMap(java.util.HashMap) UnitResponse(info.xiancloud.core.message.UnitResponse) NotifyHandler(info.xiancloud.core.NotifyHandler)

Aggregations

NotifyHandler (info.xiancloud.core.NotifyHandler)16 UnitResponse (info.xiancloud.core.message.UnitResponse)16 UnitRequest (info.xiancloud.core.message.UnitRequest)8 JSONArray (com.alibaba.fastjson.JSONArray)4 HashMap (java.util.HashMap)4 CountDownLatch (java.util.concurrent.CountDownLatch)3 JSONObject (com.alibaba.fastjson.JSONObject)2 MessageType (info.xiancloud.core.distribution.MessageType)2 UnitInstance (info.xiancloud.core.distribution.service_discovery.UnitInstance)2 DefaultLocalAsyncSender (info.xiancloud.core.message.sender.local.DefaultLocalAsyncSender)2 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)2 Constant (info.xiancloud.core.Constant)1 UnitMeta (info.xiancloud.core.UnitMeta)1 LocalNodeManager (info.xiancloud.core.distribution.LocalNodeManager)1 UnitOfflineException (info.xiancloud.core.distribution.exception.UnitOfflineException)1 UnitUndefinedException (info.xiancloud.core.distribution.exception.UnitUndefinedException)1 IdManager (info.xiancloud.core.message.IdManager)1 RoutedLocalAsyncSender (info.xiancloud.core.message.sender.local.RoutedLocalAsyncSender)1 ISequencer (info.xiancloud.core.sequence.ISequencer)1 Stream (info.xiancloud.core.stream.Stream)1