com.jakewharton.domainr
Class ServiceManager

java.lang.Object
  extended by com.jakewharton.domainr.ServiceManager

public class ServiceManager
extends Object

Class to manage service creation with default settings.

Author:
Jake Wharton

Constructor Summary
ServiceManager()
          Create a new manager instance.
 
Method Summary
 InfoService infoService()
          Get info service instance.
static InfoService newInfoService()
          Create new info service instance.
static SearchService newSearchService()
          Create new search service instance.
 SearchService searchService()
          Get search service instance.
 ServiceManager setConnectionTimeout(int connectionTimeout)
          Set default connection timeout.
 ServiceManager setReadTimeout(int readTimeout)
          Set default read timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceManager

public ServiceManager()
Create a new manager instance.

Method Detail

setConnectionTimeout

public ServiceManager setConnectionTimeout(int connectionTimeout)
Set default connection timeout.

Parameters:
connectionTimeout - Timeout (in milliseconds).
Returns:
Current instance for builder pattern.

setReadTimeout

public ServiceManager setReadTimeout(int readTimeout)
Set default read timeout.

Parameters:
readTimeout - Timeout (in milliseconds).
Returns:
Current instance for builder pattern.

infoService

public InfoService infoService()
Get info service instance.

Returns:
Instance.

searchService

public SearchService searchService()
Get search service instance.

Returns:
Instance.

newInfoService

public static final InfoService newInfoService()
Create new info service instance.

Returns:
Instance.

newSearchService

public static final SearchService newSearchService()
Create new search service instance.

Returns:
Instance.


Copyright © 2011 Jake Wharton. All Rights Reserved.