public class FritzBoxSessionImpl extends Object implements FritzBoxSession
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug |
boolean |
domockito |
protected static Logger |
LOGGER |
| Constructor and Description |
|---|
FritzBoxSessionImpl(Fritzbox pFritzbox)
create a FritzBox Session
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
doGetResponse(String relativeUrl,
String params)
response handler (to be mocked in testcases)
|
String |
getMd5(String input)
get the md5 for the given input
|
String |
getResponse(String relativeUrl,
String params)
get the response for the given relative Url
|
protected SessionInfo |
getSessionInfo(String params)
get the session info
|
<T> T |
getTypedResponse(String relativeUrl,
String params,
Class clazz)
get the XML Result
|
FritzBoxSession |
login()
login
|
void |
logout()
log out
|
static String |
readResponse(InputStream stream)
read a response string from the given input stream
|
static String |
readUrl(String url)
read from the given url
|
public static boolean debug
protected static Logger LOGGER
public boolean domockito
public FritzBoxSessionImpl(Fritzbox pFritzbox)
public FritzBoxSession login()
FritzBoxSessionlogin in interface FritzBoxSessionprotected SessionInfo getSessionInfo(String params) throws Exception, IOException
params - ExceptionIOExceptionpublic <T> T getTypedResponse(String relativeUrl, String params, Class clazz) throws Exception
getTypedResponse in interface FritzBoxSessionrelativeUrl - params - clazz - Exceptionpublic String getResponse(String relativeUrl, String params) throws Exception
getResponse in interface FritzBoxSessionrelativeUrl - params - Exceptionprotected String doGetResponse(String relativeUrl, String params) throws Exception
relativeUrl - params - Exceptionpublic static String readUrl(String url) throws MalformedURLException, IOException
url - MalformedURLExceptionIOExceptionpublic static String readResponse(InputStream stream) throws IOException
stream - IOExceptionpublic void logout()
FritzBoxSessionlogout in interface FritzBoxSessionpublic String getMd5(String input)
FritzBoxSessiongetMd5 in interface FritzBoxSessionCopyright © 2018. All rights reserved.