Package com.mparticle.networking
Class MParticleBaseClientImpl
- java.lang.Object
-
- com.mparticle.networking.MParticleBaseClientImpl
-
- All Implemented Interfaces:
MParticleBaseClient
- Direct Known Subclasses:
MParticleIdentityClientImpl
public class MParticleBaseClientImpl extends java.lang.Object implements MParticleBaseClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MParticleBaseClientImpl.Endpoint
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
REQUEST_ID
-
Constructor Summary
Constructors Constructor Description MParticleBaseClientImpl(android.content.Context context, com.mparticle.internal.ConfigManager configManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getHeaderDateString()
protected java.lang.String
getHeaderHashString(MPConnection request, java.lang.String date, java.lang.String message, java.lang.String apiSecret)
long
getNextRequestTime(MParticleBaseClientImpl.Endpoint endpoint)
BaseNetworkConnection
getRequestHandler()
protected MPUrl
getUrl(MParticleBaseClientImpl.Endpoint endpoint)
protected MPUrl
getUrl(MParticleBaseClientImpl.Endpoint endpoint, java.lang.String identityPath)
protected MPUrl
getUrl(MParticleBaseClientImpl.Endpoint endpoint, java.lang.String identityPath, boolean forceDefaultUrl)
protected MPConnection
makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection)
protected MPConnection
makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, boolean identity)
protected MPConnection
makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload)
MPConnection
makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload, boolean identity)
void
setRequestHandler(BaseNetworkConnection handler)
-
-
-
Field Detail
-
REQUEST_ID
protected static final java.lang.String REQUEST_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRequestHandler
public BaseNetworkConnection getRequestHandler()
- Specified by:
getRequestHandler
in interfaceMParticleBaseClient
-
setRequestHandler
public void setRequestHandler(BaseNetworkConnection handler)
- Specified by:
setRequestHandler
in interfaceMParticleBaseClient
-
makeUrlRequest
protected MPConnection makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection) throws java.io.IOException
- Throws:
java.io.IOException
-
makeUrlRequest
protected MPConnection makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload) throws java.io.IOException
- Throws:
java.io.IOException
-
makeUrlRequest
protected MPConnection makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, boolean identity) throws java.io.IOException
- Throws:
java.io.IOException
-
makeUrlRequest
public MPConnection makeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload, boolean identity) throws java.io.IOException
- Throws:
java.io.IOException
-
getHeaderDateString
protected java.lang.String getHeaderDateString()
-
getHeaderHashString
protected java.lang.String getHeaderHashString(MPConnection request, java.lang.String date, java.lang.String message, java.lang.String apiSecret) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.io.UnsupportedEncodingException
- Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.io.UnsupportedEncodingException
-
getNextRequestTime
public long getNextRequestTime(MParticleBaseClientImpl.Endpoint endpoint)
-
getUrl
protected MPUrl getUrl(MParticleBaseClientImpl.Endpoint endpoint) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
getUrl
protected MPUrl getUrl(MParticleBaseClientImpl.Endpoint endpoint, @Nullable java.lang.String identityPath) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
getUrl
protected MPUrl getUrl(MParticleBaseClientImpl.Endpoint endpoint, @Nullable java.lang.String identityPath, boolean forceDefaultUrl) throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
-