jp.go.nict.langrid.servicecontainer.handler.ServiceContextUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jp.go.nict.langrid.servicecontainer Show documentation
Show all versions of jp.go.nict.langrid.servicecontainer Show documentation
Service container including JSON-RPC handler for the Service Grid Server Software and java web services.
package jp.go.nict.langrid.servicecontainer.handler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import jp.go.nict.langrid.commons.ws.ServiceContext;
public class ServiceContextUtil {
public static void setCurrentServiceContextForAbstractService(ServiceContext context){
if(setCurrentContextMethod == null) return;
try {
setCurrentContextMethod.invoke(null, context);
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
}
private static Method setCurrentContextMethod;
private static Class> abstractServiceClass;
static{
try {
abstractServiceClass = Class.forName("jp.go.nict.langrid.wrapper.ws_1_2.AbstractService");
setCurrentContextMethod = abstractServiceClass.getMethod("setCurrentServiceContext", ServiceContext.class);
} catch (ClassNotFoundException e) {
} catch (NoSuchMethodException e) {
} catch (SecurityException e) {
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy