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 classMParticleBaseClientImpl.Endpoint
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringREQUEST_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.StringgetHeaderDateString()protected java.lang.StringgetHeaderHashString(MPConnection request, java.lang.String date, java.lang.String message, java.lang.String apiSecret)longgetNextRequestTime(MParticleBaseClientImpl.Endpoint endpoint)BaseNetworkConnectiongetRequestHandler()protected MPUrlgetUrl(MParticleBaseClientImpl.Endpoint endpoint)protected MPUrlgetUrl(MParticleBaseClientImpl.Endpoint endpoint, java.lang.String identityPath)protected MPUrlgetUrl(MParticleBaseClientImpl.Endpoint endpoint, java.lang.String identityPath, boolean forceDefaultUrl)protected MPConnectionmakeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection)protected MPConnectionmakeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, boolean identity)protected MPConnectionmakeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload)MPConnectionmakeUrlRequest(MParticleBaseClientImpl.Endpoint endpoint, MPConnection connection, java.lang.String payload, boolean identity)voidsetRequestHandler(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:
getRequestHandlerin interfaceMParticleBaseClient
-
setRequestHandler
public void setRequestHandler(BaseNetworkConnection handler)
- Specified by:
setRequestHandlerin 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.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.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
-
-