Hi Tharindu,
What is the receiver? why does it have a port?
--Srinath
On Thu, Dec 8, 2011 at 5:42 PM, Tharindu Mathew <tharindu at wso2.com> wrote:
> Hi,
>
> The agent (former publishers) API has been simplified as follows:
>
> public interface AgentAPI {
>
> public void publish(ArrayList<Event> events, Receiver receiver);
>
> }
>
> A sample client written will inherit the non-blocking qualities and thrift
> support. A sample client code is give below:
>
> Event event = new Event();
>
> event.setCorrelation(createCorrelationMap());
> event.setEvent(createEventDataMap());
> event.setMeta(createMetaDataMap());
>
> Receiver receiver = new Receiver();
> receiver.setSocketTransportEnabled(true);
> receiver.setUrl("https://localhost:9443/");
> receiver.setUserName("admin");
> receiver.setPassword("admin");
> receiver.setPort(7611);
>
> ArrayList<Event> events = new ArrayList<Event>();
> events.add(event);
>
> setTrustStoreParams();
>
> PublisherConfiguration configuration = new PublisherConfiguration();
> Agent agent = new Agent(configuration);
> agent.publish(events, receiver);
>
>
> We will be gradually moving the existing bam2 publishers to this. Meanwhile,
> this can be easily embedded for a 3rd party application.
> --
> Regards,
>
> Tharindu
>
> blog: http://mackiemathew.com/
>
>
> _______________________________________________
> Architecture mailing list
> Architecture at wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
--
============================
Srinath Perera, Ph.D.
http://www.cs.indiana.edu/~hperera/
http://srinathsview.blogspot.com/