Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Asynchronous Injection
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
funnelbit
June 22, 2016
Technology
290
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Asynchronous Injection
funnelbit
June 22, 2016
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.5k
droidkaigi-2017-renovation
funnelbit
10
11k
Dart
funnelbit
0
300
BottomBarAndSnackBar
funnelbit
0
550
Dagger2 Optional bindings
funnelbit
0
620
WearableRecyclerView
funnelbit
1
850
QucikSettingsTileAPI
funnelbit
0
390
Mobile Vision
funnelbit
0
490
AwarenessAPI
funnelbit
0
170
Other Decks in Technology
See All in Technology
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
0
1.5k
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
制約理論(ToC)入門 2026版
recruitengineers
PRO
2
330
Digitization部 紹介資料
sansan33
PRO
2
7.7k
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
1.3k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.1k
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
440
【CEDEC2026】ゲームシナリオライターを支援するAIツール開発の実践 ― 設計とプロンプトの工夫 ―
cygames
PRO
1
710
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
170
Atlassian Cloudサポート業務でのAIエージェント活用事例
smt7174
0
410
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
270
TypeScript入門 2026
recruitengineers
PRO
1
260
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
440
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
200
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
190
How to Talk to Developers About Accessibility
jct
2
480
Transcript
"TZODISPOPVT*OKFDUJPO JEGVOOFMCJU
ࣗݾհ ଜྋ )BUFOBGVOOFMCJU 5XJUUFS!FYQFSPQFSP
None
"OESPJE Ͱ ඇಉظ ʹ ґଘղܾ͢Δ
%BHHFS 1SPEVDFST w ඇಉظͰґଘղܾ͢ΔΈΛఏڙ
؆୯ͳྫ w .PEVMFº w $PNQPOFOU w "DUJWJUZ
.PEVMF @ProducerModule final class AppProducerModule { @Produces ListenableFuture<UserData> getUserData() {
// ~ ͳΜ͔ΊͬͪΌ͕͔͔࣌ؒΔॲཧ ~ return Futures.immediateFuture(new UserData("userName")); } @Produces String userName(UserData userData) { return userData.name; // Activity ͜Ε͕΄͍͠ }
.PEVMF @ProducerModule final class AppProducerModule { @Produces ListenableFuture<UserData> getUserData() {
// 1 // ~ ͳΜ͔ΊͬͪΌ͕͔͔࣌ؒΔॲཧ ~ return Futures.immediateFuture(new UserData("userName")); } @Produces String userName(UserData userData) { // 2 return userData.name; // Activity ͜Ε͕΄͍͠ }
.PEVMF @Module public class ExecutorModule { @Provides @Production static Executor
executor() { return Executors.newCachedThreadPool(); } }
$PNQPOFOU @ProductionComponent(modules = { ExecutorModule.class, AppProducerModule.class}) public interface AppProducerComponent {
ListenableFuture<String> userName(); }
"DUJWJUZ … ListenableFuture<String> userDataListenableFuture = DaggerAppProducerComponent.create().userName(); Futures.addCallback( userDataListenableFuture, new FutureCallback<String>()
{ @Override public void onSuccess(String result) { Log.e("name", result); } @Override public void onFailure(Throwable t) { Log.e("failure", t.toString()); } }); …
1SPEVDFS5
.PEVMF @ProducerModule public class AppProducerLazyModule { @Produces @Normal ListenableFuture<UserData> provideNUserData()
{ return Futures.immediateFuture(new UserData("normal")); } @Produces @Special ListenableFuture<UserData> provideSUserData() { return Futures.immediateFuture(new UserData("special")); } @Produces ListenableFuture<UserData> provideUserData( @Normal Producer<UserData> nProducer, @Special Producer<UserData> sProducer) { return sProducer.get(); } }
@ProducerModule public class MyModule { @Produces ListenableFuture<A> a() { …
} @Produces ListenableFuture<B> b(A a) { … } @Produces ListenableFuture<C> c(B b) { … } @Produces @Delayed ListenableFuture<C> delayedC(A a, Producer<C> c) { … return c.get(); } }
@ProducerModule public class MyModule { @Produces ListenableFuture<A> a() { …
} // 1 @Produces ListenableFuture<B> b(A a) { … } // 3 @Produces ListenableFuture<C> c(B b) { … } // 4 @Produces @Delayed ListenableFuture<C> delayedC(A a, Producer<C> c) { … return c.get(); } // 2 }
1SPEVDFE5
.PEVMF @ProducerModule final class AppProducerModule { @Produces ListenableFuture<UserData> getUserData() {
// ~ ͳΜ͔ΊͬͪΌ͕͔͔࣌ؒΔॲཧ ~ throw new IllegalStateException(); // Θ͟ͱམͱ͢ } @Produces String userName(Produced<UserData> userData) { try { return userData.get().name; } catch (ExecutionException e) { e.printStackTrace(); return "Կ͔͕ى͖ͨ"; } } }
ৄࡉ w IUUQHPPHMFHJUIVCJPEBHHFSQSPEVDFST
͋Γ͕ͱ͏͍͟͝·ͨ͠