appengine ja
    night
  sapporo#1
AppEngine Lower
  shin1ogawa@
Delegate
final ApiProxy.Delegate defaultDelegate =
  ApiProxy.getDelegate();

public byte[] makeSyncCall(
 Environment environment, String service,
 String method, byte[] request)
 throws ApiProxyException {
 System.out.println(service + “#” + method);
 defaultDelegate.makeSyncCall(
  serviceName, methodName, request);
}
public byte[] makeSyncCall(
 Environment environment, String service,
 String method, byte[] request)
 throws ApiProxyException {
 if (service.equals(“datastore_v3”)
   && method.equalsIgnoreCase(“Put”)
 ){
   throw new CapabilityDisabledException();
 }
 defaultDelegate.makeSyncCall(
   serviceName, methodName, request);
}
String service =
 req.getHeader(SERVICE_NAME);
String method = req.getHeader(METHOD_NAME);
byte[] requestBytes =
 IOUtils.toByteArray(req.getInputStream());
byte[] responseBytes =
 ApiProxy.getDelegate().makeSyncCall(
  ApiProxy.getCurrentEnvironment(),
  service, method, requestBytes);
resp.getOutputStream().write(responseBytes);
public byte[] makeSyncCall(
 Environment environment, String service,
 String method, byte[] request)
 throws ApiProxyException {
  return protocolBufferOnHttp(
   environment, service, method, request);
}

byte[] protocolBufferOnHttp(.....) {
 // makeSyncCallServlet Post
 // byte[]
}
shin1ogawa@

Appengine ja-night-sapporo#1 bt

  • 1.
    appengine ja night sapporo#1 AppEngine Lower shin1ogawa@
  • 4.
  • 5.
    final ApiProxy.Delegate defaultDelegate= ApiProxy.getDelegate(); public byte[] makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException { System.out.println(service + “#” + method); defaultDelegate.makeSyncCall( serviceName, methodName, request); }
  • 7.
    public byte[] makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException { if (service.equals(“datastore_v3”) && method.equalsIgnoreCase(“Put”) ){ throw new CapabilityDisabledException(); } defaultDelegate.makeSyncCall( serviceName, methodName, request); }
  • 11.
    String service = req.getHeader(SERVICE_NAME); String method = req.getHeader(METHOD_NAME); byte[] requestBytes = IOUtils.toByteArray(req.getInputStream()); byte[] responseBytes = ApiProxy.getDelegate().makeSyncCall( ApiProxy.getCurrentEnvironment(), service, method, requestBytes); resp.getOutputStream().write(responseBytes);
  • 12.
    public byte[] makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException { return protocolBufferOnHttp( environment, service, method, request); } byte[] protocolBufferOnHttp(.....) { // makeSyncCallServlet Post // byte[] }
  • 14.