Class ManagedAnnotationUsage.RemoteConsumer
java.lang.Object
org.j7m.middleware.examples.annotation.ManagedAnnotationUsage.RemoteConsumer
- Enclosing class:
ManagedAnnotationUsage
Demonstrates explicit optional availability rather than a null injected service.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteConsumer(org.j7m.middleware.application.api.ManagedProvider<Optional<ManagedAnnotationUsage.RemoteApi>> remote) Receives a host-authorized optional binding; the annotation installs no policy itself. -
Method Summary
Modifier and TypeMethodDescriptiongreetOrFallback(String name) Calls an available service or reports explicit absence.
-
Constructor Details
-
RemoteConsumer
public RemoteConsumer(org.j7m.middleware.application.api.ManagedProvider<Optional<ManagedAnnotationUsage.RemoteApi>> remote) Receives a host-authorized optional binding; the annotation installs no policy itself.- Parameters:
remote- typed optional service provider using the host's optional policy- Throws:
NullPointerException- if the provider is absent
-
-
Method Details
-
greetOrFallback
-