public class

AsyncHandlerLinkedInApiClientAdapter

extends Object
implements AsyncHandlerLinkedInApiClient
java.lang.Object
   ↳ com.google.code.linkedinapi.client.impl.AsyncHandlerLinkedInApiClientAdapter

Summary

Fields
private LinkedInApiClient client Field description
private ExecutorService taskExecutor Field description
Public Constructors
AsyncHandlerLinkedInApiClientAdapter(LinkedInApiClient client, ExecutorService taskExecutor)
Constructs ...
Public Methods
void addLocale(Locale locale)
void addRequestHeader(String headerName, String headerValue)
Adds the request header.
void deleteCurrentStatus(AsyncResponseHandler<?> handler)
Delete current status.
LinkedInAccessToken getAccessToken()
Method description
LinkedInApiConsumer getApiConsumer()
Method description
void getConnectionsById(String id, int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections by id.
void getConnectionsById(String id, Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)
Gets the connections by id.
void getConnectionsById(String id, Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections by id.
void getConnectionsById(String id, AsyncResponseHandler<Connections> handler)
Gets the connections by id.
void getConnectionsByUrl(String url, Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)
Gets the connections by url.
void getConnectionsByUrl(String url, int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections by url.
void getConnectionsByUrl(String url, AsyncResponseHandler<Connections> handler)
Gets the connections by url.
void getConnectionsByUrl(String url, Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections by url.
void getConnectionsForCurrentUser(Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)
Gets the connections for current user.
void getConnectionsForCurrentUser(int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections for current user.
void getConnectionsForCurrentUser(Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)
Gets the connections for current user.
void getConnectionsForCurrentUser(AsyncResponseHandler<Connections> handler)
Gets the connections for current user.
void getNetworkUpdateComments(String networkUpdateId, AsyncResponseHandler<UpdateComments> handler)
Gets the network update comments.
void getNetworkUpdates(Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(Date startDate, Date endDate, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(Set<NetworkUpdateType> updateTypes, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(Set<NetworkUpdateType> updateTypes, int start, int count, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getNetworkUpdates(int start, int count, AsyncResponseHandler<Network> handler)
Gets the network updates.
void getProfileByApiRequest(ApiStandardProfileRequest apiRequest, AsyncResponseHandler<Person> handler)
Gets the profile by API request.
void getProfileById(String id, Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)
Gets the profile by id.
void getProfileById(String id, AsyncResponseHandler<Person> handler)
Gets the profile by id.
void getProfileByUrl(String url, ProfileType profileType, Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)
Gets the profile by url.
void getProfileByUrl(String url, ProfileType profileType, AsyncResponseHandler<Person> handler)
Gets the profile by url.
void getProfileForCurrentUser(AsyncResponseHandler<Person> handler)
Gets the profile for current user.
void getProfileForCurrentUser(Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)
Gets the profile for current user.
Map<String, String> getRequestHeaders()
Gets the request headers.
void postComment(String networkUpdateId, String commentText, AsyncResponseHandler<?> handler)
Post comment.
void postNetworkUpdate(String updateText, AsyncResponseHandler<?> handler)
Post network update.
void removeRequestHeader(String headerName)
Removes the request header.
void searchPeople(Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder, AsyncResponseHandler<People> handler)
Search people.
void searchPeople(Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder, AsyncResponseHandler<People> handler)
Search people.
void searchPeople(Map<SearchParameter, String> searchParameters, int start, int count, AsyncResponseHandler<People> handler)
Search people.
void searchPeople(Map<SearchParameter, String> searchParameters, AsyncResponseHandler<People> handler)
Search people.
void searchPeople(AsyncResponseHandler<People> handler)
Search people.
void sendInviteByEmail(String email, String firstName, String lastName, String subject, String message, AsyncResponseHandler<?> handler)
Send invite.
void sendInviteById(String recepientId, String subject, String message, String authHeader, AsyncResponseHandler<?> handler)
Send invite.
void sendInviteToPerson(Person recepient, String subject, String message, AsyncResponseHandler<?> handler)
Send invite.
void sendMessage(List<String> recepientIds, String subject, String message, AsyncResponseHandler<?> handler)
Send message.
void setAccessToken(LinkedInAccessToken accessToken)
Method description
void setApiConsumer(LinkedInApiConsumer apiConsumer)
Method description
void setRequestHeaders(Map<String, String> requestHeaders)
Sets the request headers.
void updateCurrentStatus(String status, AsyncResponseHandler<?> handler)
Update current status.
Protected Methods
<T> Future<T> execute(Callable<T> task)
Method description
Future execute(Runnable task)
Method description
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.code.linkedinapi.client.AsyncHandlerLinkedInApiClient
From interface com.google.code.linkedinapi.client.LinkedInAuthenticationClient
From interface com.google.code.linkedinapi.client.LinkedInCommunicationClient

Fields

private LinkedInApiClient client

Field description

private ExecutorService taskExecutor

Field description

Public Constructors

public AsyncHandlerLinkedInApiClientAdapter (LinkedInApiClient client, ExecutorService taskExecutor)

Constructs ...

Parameters
client
taskExecutor

Public Methods

public void addLocale (Locale locale)

Parameters
locale

public void addRequestHeader (String headerName, String headerValue)

Adds the request header.

Parameters
headerName The header name
headerValue The header value

public void deleteCurrentStatus (AsyncResponseHandler<?> handler)

Delete current status. For details see http://developer.linkedin.com/docs/DOC-1007

Parameters
handler
Returns
  • the future

public LinkedInAccessToken getAccessToken ()

Method description

public LinkedInApiConsumer getApiConsumer ()

Method description

public void getConnectionsById (String id, int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
start The start
count The count
handler
Returns
  • the connections by id

public void getConnectionsById (String id, Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
handler
Returns
  • the connections by id

public void getConnectionsById (String id, Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
profileFields The profile fields
start The start
count The count
handler
Returns
  • the connections by id

public void getConnectionsById (String id, AsyncResponseHandler<Connections> handler)

Gets the connections by id. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
id The id
handler
Returns
  • the connections by id

public void getConnectionsByUrl (String url, Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
handler
Returns
  • the connections by url

public void getConnectionsByUrl (String url, int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
start The start
count The count
handler
Returns
  • the connections by url

public void getConnectionsByUrl (String url, AsyncResponseHandler<Connections> handler)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
handler
Returns
  • the connections by url

public void getConnectionsByUrl (String url, Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections by url. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
url The url
profileFields The profile fields
start The start
count The count
handler
Returns
  • the connections by url

public void getConnectionsForCurrentUser (Set<ProfileField> profileFields, AsyncResponseHandler<Connections> handler)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
handler
Returns
  • the connections for current user

public void getConnectionsForCurrentUser (int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
start The start
count The count
handler
Returns
  • the connections for current user

public void getConnectionsForCurrentUser (Set<ProfileField> profileFields, int start, int count, AsyncResponseHandler<Connections> handler)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
profileFields The profile fields
start The start
count The count
handler
Returns
  • the connections for current user

public void getConnectionsForCurrentUser (AsyncResponseHandler<Connections> handler)

Gets the connections for current user. For details see http://developer.linkedin.com/docs/DOC-1004

Parameters
handler
Returns
  • the connections for current user

public void getNetworkUpdateComments (String networkUpdateId, AsyncResponseHandler<UpdateComments> handler)

Gets the network update comments. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id
handler
Returns
  • the network update comments

public void getNetworkUpdates (Set<NetworkUpdateType> updateTypes, int start, int count, Date startDate, Date endDate, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
startDate The start date
endDate The end date
handler
Returns
  • the network updates

public void getNetworkUpdates (Date startDate, Date endDate, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
startDate The start date
endDate The end date
handler
Returns
  • the network updates

public void getNetworkUpdates (Set<NetworkUpdateType> updateTypes, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
handler
Returns
  • the network updates

public void getNetworkUpdates (AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
handler
Returns
  • the network updates

public void getNetworkUpdates (Set<NetworkUpdateType> updateTypes, Date startDate, Date endDate, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
startDate The start date
endDate The end date
handler
Returns
  • the network updates

public void getNetworkUpdates (Set<NetworkUpdateType> updateTypes, int start, int count, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
updateTypes The update types
start The start
count The count
handler
Returns
  • the network updates

public void getNetworkUpdates (int start, int count, AsyncResponseHandler<Network> handler)

Gets the network updates. For details see http://developer.linkedin.com/docs/DOC-1006

Parameters
start The start
count The count
handler
Returns
  • the network updates

public void getProfileByApiRequest (ApiStandardProfileRequest apiRequest, AsyncResponseHandler<Person> handler)

Gets the profile by API request. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
apiRequest The api request
handler
Returns
  • the profile by api request

public void getProfileById (String id, Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)

Gets the profile by id. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
id The id
profileFields The profile fields
handler
Returns
  • the profile by id

public void getProfileById (String id, AsyncResponseHandler<Person> handler)

Gets the profile by id. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
id The id
handler
Returns
  • the profile by id

public void getProfileByUrl (String url, ProfileType profileType, Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)

Gets the profile by url. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
url The url
profileType The profile type
profileFields The profile fields
handler
Returns
  • the profile by url

public void getProfileByUrl (String url, ProfileType profileType, AsyncResponseHandler<Person> handler)

Gets the profile by url. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
url The url
profileType The profile type
handler
Returns
  • the profile by url

public void getProfileForCurrentUser (AsyncResponseHandler<Person> handler)

Gets the profile for current user. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
handler
Returns
  • the profile for current user

public void getProfileForCurrentUser (Set<ProfileField> profileFields, AsyncResponseHandler<Person> handler)

Gets the profile for current user. For details see http://developer.linkedin.com/docs/DOC-1002

Parameters
profileFields The profile fields
handler
Returns
  • the profile for current user

public Map<String, String> getRequestHeaders ()

Gets the request headers.

Returns
  • the request headers

public void postComment (String networkUpdateId, String commentText, AsyncResponseHandler<?> handler)

Post comment. For details see http://developer.linkedin.com/docs/DOC-1043

Parameters
networkUpdateId The network update id
commentText The comment text
handler
Returns
  • the future

public void postNetworkUpdate (String updateText, AsyncResponseHandler<?> handler)

Post network update. For details see http://developer.linkedin.com/docs/DOC-1009

Parameters
updateText The update text
handler
Returns
  • the future

public void removeRequestHeader (String headerName)

Removes the request header.

Parameters
headerName The header name

public void searchPeople (Map<SearchParameter, String> searchParameters, int start, int count, SearchSortOrder sortOrder, AsyncResponseHandler<People> handler)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
sortOrder The sort order
handler
Returns
  • the future< people>

public void searchPeople (Map<SearchParameter, String> searchParameters, SearchSortOrder sortOrder, AsyncResponseHandler<People> handler)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
sortOrder The sort order
handler
Returns
  • the future< people>

public void searchPeople (Map<SearchParameter, String> searchParameters, int start, int count, AsyncResponseHandler<People> handler)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
start The start
count The count
handler
Returns
  • the future< people>

public void searchPeople (Map<SearchParameter, String> searchParameters, AsyncResponseHandler<People> handler)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
searchParameters The search parameters
handler
Returns
  • the future< people>

public void searchPeople (AsyncResponseHandler<People> handler)

Search people. For details see http://developer.linkedin.com/docs/DOC-1005

Parameters
handler
Returns
  • the future< people>

public void sendInviteByEmail (String email, String firstName, String lastName, String subject, String message, AsyncResponseHandler<?> handler)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

Parameters
email The recepient email
firstName The first name
lastName The last name
subject The subject
message The message
handler
Returns
  • the future

public void sendInviteById (String recepientId, String subject, String message, String authHeader, AsyncResponseHandler<?> handler)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

To call this method one needs an auth header parameter. This can be obtained by getting getHeaders() from getApiStandardProfileRequest() and then getting the value of header with name AUTH_HEADER_NAME.

Parameters
recepientId The recepient id
subject The subject
message The message
authHeader The auth header
handler
Returns
  • the future

public void sendInviteToPerson (Person recepient, String subject, String message, AsyncResponseHandler<?> handler)

Send invite. For details see http://developer.linkedin.com/docs/DOC-1012

To call this method one needs an auth header parameter. This can be obtained by getting getHeaders() from getApiStandardProfileRequest() and then getting the value of header with name AUTH_HEADER_NAME.

Parameters
recepient The recepient
subject The subject
message The message
handler
Returns
  • the future

public void sendMessage (List<String> recepientIds, String subject, String message, AsyncResponseHandler<?> handler)

Send message. For details see http://developer.linkedin.com/docs/DOC-1044

Parameters
recepientIds The recepient ids
subject The subject
message The message
handler
Returns
  • the future

public void setAccessToken (LinkedInAccessToken accessToken)

Method description

Parameters
accessToken

public void setApiConsumer (LinkedInApiConsumer apiConsumer)

Method description

Parameters
apiConsumer

public void setRequestHeaders (Map<String, String> requestHeaders)

Sets the request headers.

Parameters
requestHeaders The request headers

public void updateCurrentStatus (String status, AsyncResponseHandler<?> handler)

Update current status. For details see http://developer.linkedin.com/docs/DOC-1007

Parameters
status The status
handler
Returns
  • the future

Protected Methods

protected Future<T> execute (Callable<T> task)

Method description

Parameters
task

protected Future execute (Runnable task)

Method description

Parameters
task