st louis cloud foundry meetup march 2017
TRANSCRIPT
CLOUD FOUNDRY JAVA CLIENT FOR FUN AND PROFIT†
Josh Ghiloni
@joshghiloni
†Fun and Profit Not Guaranteed
1
ABOUT ECS TEAMTechnology consulting company with headquarters in Denver, COFounded in 1999Completed 40+ cloud native development engagements since 2014Bronze Sponsor, CF SummitSilver Member, CF FoundationSponsor, Colorado CF Meetup
2
AGENDA1. What's new in Java 8?2. Introduction to Project Reactor3. Interacting with the UAA4. Interacting with the Cloud Foundry API5. Interacting with the Firehose
3
WHAT'S NEW IN JAVA 8?
4 . 1
WHAT'S NEW IN JAVA 8?FUNCTIONAL INTERFACES
public interface Function<T, R> { R apply(T input); }
4 . 2
WHAT'S NEW IN JAVA 8?STREAMS
public <T> Stream<T> of(T... items) { return Arrays.stream(items); }
4 . 3
WHAT'S NEW IN JAVA 8?
4 . 4
WHAT'S NEW IN JAVA 8?LAMBDAS
public List<Integer> squaredIntegers(Integer... ints) { return Arrays.stream(ints).map((i) -> i * i).collect(Collectors.toList()); }
public List<Integer> positiveIntegers(Integer... ints) { return Arrays.stream(ints).filter((i) -> i > 0).collect(Collectors.toList()); }
4 . 5
INTRODUCTION TO PROJECTREACTOR
5 . 1
INTRODUCTION TO PROJECT REACTORNon-blocking APICompatible with Standard Java FeaturesTyped sequences
Publisher - Reactive Standard (used for 0 .. N items)Mono - Used for 0 .. 1 itemsFlux - Used for N items
5 . 2
INTERACTING WITH THE CLOUD FOUNDRY APITwo global components:
ConnectionContext - Info about foundationTokenProvider - Authentication information
6 . 1
INTERACTING WITH THE CLOUD FOUNDRY APIClient interface:
ConnectionContext - Info about foundationTokenProvider - Authentication informationUaaClient - Work with the Cloud Foundry UAA
6 . 2
INTERACTING WITH THE CLOUD FOUNDRY APIDEMO!
6 . 3
INTERACTING WITH THE CLOUD FOUNDRY APIClient interface:
ConnectionContext - Info about foundationTokenProvider - Authentication informationUaaClient - Work with the Cloud Foundry UAACloudFoundryClient - Work with the Cloud Foundry REST API
6 . 4
INTERACTING WITH THE CLOUD FOUNDRY APIDEMO!
6 . 5
INTERACTING WITH THE CLOUD FOUNDRY APIClient interface:
ConnectionContext - Info about foundationTokenProvider - Authentication informationUaaClient - Work with the Cloud Foundry UAACloudFoundryClient - Work with the Cloud Foundry REST APIDopplerClient - Work with the Cloud Foundry Firehose
6 . 6
INTERACTING WITH THE CLOUD FOUNDRY APIDEMO!
6 . 7
THANKS!ANY QUESTIONS?
7