当前位置: 首页>>代码示例>>Java>>正文


Java AsynchronousCallback类代码示例

本文整理汇总了Java中org.kuali.rice.ksb.api.messaging.AsynchronousCallback的典型用法代码示例。如果您正苦于以下问题:Java AsynchronousCallback类的具体用法?Java AsynchronousCallback怎么用?Java AsynchronousCallback使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AsynchronousCallback类属于org.kuali.rice.ksb.api.messaging包,在下文中一共展示了AsynchronousCallback类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: notifyOnCallback

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
protected void notifyOnCallback(AsynchronousCall methodCall, AsynchronousCallback callback, Object callResult) {
    if (callback != null) {
        try {
            synchronized (callback) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Notifying callback " + callback + " with callResult " + callResult);
                }
                callback.notifyAll();
                if (callResult instanceof Serializable || callResult == null) {
                    callback.callback((Serializable) callResult, methodCall);
                } else {
                    // may never happen
                    LOG.warn("Attempted to call callback with non-serializable object.");
                }
            }
        } catch (Throwable t) {
            LOG.error("Caught throwable from callback object " + callback.getClass(), t);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:MessageServiceInvoker.java

示例2: notifyGlobalCallbacks

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
protected void notifyGlobalCallbacks(AsynchronousCall methodCall, Object callResult) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("Notifying global callbacks");
    }
    for (AsynchronousCallback globalCallBack : GlobalCallbackRegistry.getCallbacks()) {
        notifyOnCallback(methodCall, globalCallBack, callResult);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:MessageServiceInvoker.java

示例3: createInstance

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public static Object createInstance(List<Endpoint> endpoints, AsynchronousCallback callback,
    Serializable context, String value1, String value2) {
if (endpoints == null || endpoints.isEmpty()) {
    throw new RuntimeException("Cannot create service proxy, no service(s) passed in.");
}
try {
return Proxy.newProxyInstance(ClassLoaderUtils.getDefaultClassLoader(), ContextClassLoaderProxy
	.getInterfacesToProxy(endpoints.get(0).getService()), new SynchronousServiceCallProxy(
			endpoints, callback, context, value1, value2));
} catch (Exception e) {
    throw new RiceRuntimeException(e);
   }
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:SynchronousServiceCallProxy.java

示例4: AsynchronousServiceCallProxy

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
protected AsynchronousServiceCallProxy(List<Endpoint> endpoints, AsynchronousCallback callback,
        Serializable context, String value1, String value2) {
    this.endpoints = endpoints;
    this.callback = callback;
    this.context = context;
    this.value1 = value1;
    this.value2 = value2;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:AsynchronousServiceCallProxy.java

示例5: createInstance

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public static Object createInstance(List<Endpoint> endpoints, AsynchronousCallback callback, Serializable context,
        String value1, String value2) {
    if (endpoints == null || endpoints.isEmpty()) {
        throw new RuntimeException("Cannot create service proxy, no service(s) passed in.");
    }
    try {
        return Proxy.newProxyInstance(ClassLoaderUtils.getDefaultClassLoader(),
                ContextClassLoaderProxy.getInterfacesToProxy(endpoints.get(0).getService()),
                new AsynchronousServiceCallProxy(endpoints, callback, context, value1, value2));
    } catch (Exception e) {
        throw new RiceRuntimeException(e);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:AsynchronousServiceCallProxy.java

示例6: getServiceAsynchronously

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
@Override
public <T> T getServiceAsynchronously(QName qname, String applicationId, AsynchronousCallback callback,
        Serializable context, String value1, String value2) {

	List<Endpoint> endpoints = KsbApiServiceLocator.getServiceBus().getEndpoints(qname);
    endpoints = filterEndpointsByApplicationId(endpoints, applicationId);
	if (endpoints.isEmpty()) {
		throw new RuntimeException("Cannot create service proxy, failed to locate any endpoints with the given service name: " + qname + (applicationId != null ? ", and application id: " + applicationId : ""));
	}
    return (T) createProxy(syncMode(), endpoints, callback, context, value1, value2);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:MessageHelperImpl.java

示例7: getCallbacks

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public static List<AsynchronousCallback> getCallbacks() {
	return callbacks;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:GlobalCallbackRegistry.java

示例8: setCallbacks

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public static void setCallbacks(List<AsynchronousCallback> callbacks) {
	GlobalCallbackRegistry.callbacks = callbacks;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:GlobalCallbackRegistry.java

示例9: SynchronousServiceCallProxy

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
private SynchronousServiceCallProxy(List<Endpoint> endpoints, AsynchronousCallback callback,
    Serializable context, String value1, String value2) {
super(endpoints, callback, context, value1, value2);
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:SynchronousServiceCallProxy.java

示例10: getCallback

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public AsynchronousCallback getCallback() {
    return this.callback;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:AsynchronousServiceCallProxy.java

示例11: setCallback

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public void setCallback(AsynchronousCallback callback) {
    this.callback = callback;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:AsynchronousServiceCallProxy.java

示例12: getCallback

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public AsynchronousCallback getCallback() {
	return this.callback;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:BAMTargetEntry.java

示例13: setCallback

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public void setCallback(AsynchronousCallback callback) {
	this.callback = callback;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:BAMTargetEntry.java

示例14: createProxy

import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; //导入依赖的package包/类
public static <T> T createProxy(boolean sync, List<Endpoint> endpoints, AsynchronousCallback callback, Serializable context, String value1, String value2) {
    return sync ? (T) SynchronousServiceCallProxy.createInstance(endpoints, callback, context, value1, value2)
            : (T) AsynchronousServiceCallProxy.createInstance(endpoints, callback, context, value1, value2);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:MessageHelperImpl.java


注:本文中的org.kuali.rice.ksb.api.messaging.AsynchronousCallback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。