Package org.simple4j.wsfeeler.pojoashttp
Class HTTPExposer
java.lang.Object
org.simple4j.wsfeeler.pojoashttp.HTTPExposer
This class can be used to expose any method in any bean in a Spring ApplicationContext as a HTTP service
-
Constructor Summary
ConstructorsConstructorDescriptionHTTPExposer(org.springframework.context.ApplicationContext context) Constructor with org.springframework.context.ApplicationContext instance as parameter -
Method Summary
Modifier and TypeMethodDescriptionvoidexpose()This method will turn on the listener to expose bean methods as web serviceintIdle timeout in milli seconds for the listener thread to be destroyed to reach min thread countintPort number to start the listener atintMax thread count for the listener to serve requestsintMin thread count for the listener to serve requestsURL base path for the listener to expose the servicevoidsetListenerIdleTimeoutMillis(int listenerIdleTimeoutMillis) voidsetListenerPortNumber(int listenerPortNumber) voidsetListenerThreadMax(int listenerThreadMax) voidsetListenerThreadMin(int listenerThreadMin) voidsetUrlBase(String urlBase)
-
Constructor Details
-
HTTPExposer
public HTTPExposer(org.springframework.context.ApplicationContext context) Constructor with org.springframework.context.ApplicationContext instance as parameter- Parameters:
context- - org.springframework.context.ApplicationContext instance
-
-
Method Details
-
expose
public void expose()This method will turn on the listener to expose bean methods as web service -
getListenerPortNumber
public int getListenerPortNumber()Port number to start the listener at -
setListenerPortNumber
public void setListenerPortNumber(int listenerPortNumber) -
getListenerThreadMax
public int getListenerThreadMax()Max thread count for the listener to serve requests -
setListenerThreadMax
public void setListenerThreadMax(int listenerThreadMax) -
getListenerThreadMin
public int getListenerThreadMin()Min thread count for the listener to serve requests -
setListenerThreadMin
public void setListenerThreadMin(int listenerThreadMin) -
getListenerIdleTimeoutMillis
public int getListenerIdleTimeoutMillis()Idle timeout in milli seconds for the listener thread to be destroyed to reach min thread count -
setListenerIdleTimeoutMillis
public void setListenerIdleTimeoutMillis(int listenerIdleTimeoutMillis) -
getUrlBase
URL base path for the listener to expose the service -
setUrlBase
-