Appengine Java Night #2b

download Appengine Java Night #2b

of 15

  • date post

    24-Jan-2015
  • Category

    Technology

  • view

    996
  • download

    2

Embed Size (px)

description

 

Transcript of Appengine Java Night #2b

  • 1. appengine java night #2 shin1ogawa@

2. AppEngine AppEngineApiProxy#getDelegate() Delegate WebDelegate Web ApiProxy#getCurrentEnvironment() Environment (ApplicationID, versionID) 3. AppEngine JUnitSDKWebApiProy EnvironmentApiProxy#setEnvironmentForCurrentThread() Delegate ApiProxyLocalImplApiProxy#setDelegate() 4. Environment ApplicationID, versionID, WebSingleThread ApiProxy#setEnvironmentForCurrentThread() 5. Delegate : ApiProxyLocalImpl Delegate Delegate WEB-INF/queue.xml datastore-indexes.xml 6. Delegate Delegate / ApiProxy#getDelegate()AOP 7. Delegate class MyDelegate implements Delegate { Delegate original = ApiProxy.getDelegate(); public byte[] makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException { System.out.println(service+:+method); return original.makeSyncCall(environment, service, method, requst); } } 8. makeSyncCall()byte[] Delegate#makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException 9. makeSyncCall()byte[] Delegate#makeSyncCall( Environment environment, String service, String method, byte[] request) throws ApiProxyException 10. makeSyncCall() datastore_v3#GET : DatastorePb.GetRequest new GetRequest().mergeFrom(byte[]) GetRequest#keyIterator() KeyIterator : DatastorePb.GetResponse new GetResponse().mergeFrom(byte[]) GetResponse#entityIterator()Entity Iterator 11. Mail MailServiceDelegate#makeSyncCall()Stub makeSyncCall() byte[]MailServicePb.MailMessageMailMessage#getCC()... assert 12. 13. datastore_v3#GET memcache#GETdatastoremamcache#GET datastore_v3#PUT/DELETE memcache#DELETEdatastore 14. shin1ogawa@