I have a lync account.When someone send a message.I want to get that message in to my java application.What are the steps I should follow to create this application.I read lync API but i can't find way to get data inside lync.If I can get that data into java servlet it also ok.I want to get chats(mainly) and availability of other users.
(as far as I know) there isn't any support for using the Lync APIs in Java.
However, UCWA has been designed as a REST-like API, using just HTTP Request and Response calls to interact with Lync. This means that although it's primarily meant for use on the web, you can use it in any language, including Java.
have a look at ucwa.lync.com - there's plenty of examples. The examples are in JavaScript, but if you know how to do HTTP requests and deal with responses in Java, you should be fine.