You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Background: Apache Streams contains java interfaces which emulate social network REST APIs and implementations (some using Juneau Rest Proxy) for call method on those APIs via java.

Objective: Expose those interfaces / implementations via a hosted REST API, supporting an HTML serialization option, allowing a user to discover what methods are available, activate them, and view the results directly in the browser.

Some Relevant classes:

 

Proof of concept code : 

https://gist.github.com/steveblackmon/928396d08b0bde3dfbd601ad3d2200a5

 

Proof of concept interaction :

Failure seem to occur in PojoIntrospector.java

Line 131

Method m = p.getBeanContext().createSession().getClassMeta(o.getClass()).getPublicMethods().get(method);

m = null

because o.getClass() = java.util.LinkedHashMap$LinkedKeySet

where-as it seems that it should be org.apache.streams.twitter.api.Account.class

In fact 

p.getBeanContext().createSession().getClassMeta(org.apache.streams.twitter.api.Account.class).getPublicMethods().get(method);

finds 'settings' as expected.

 

  • No labels