public class HTTPPush extends java.lang.Object implements HTTPPushMBean
| Constructor and Description |
|---|
HTTPPush() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
USER Abort the underlying MAP Dialog
|
protected void |
addStatusEntry(java.lang.String entry) |
void |
close()
Close the underlying MAP Dialog.
|
protected void |
establishSession() |
java.lang.String |
getIsdn()
Get the MSISDN where USSD request is to be pushed
|
protected org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString |
getISDNAddressString() |
protected long |
getNewID() |
java.lang.String |
getStatus()
Return current status of service - what has been sent, what has been
received etc.
|
java.lang.String |
getTargetUri()
Get the URI pointing to USSD Gateway for push
|
protected org.mobicents.protocols.ss7.map.api.primitives.USSDString |
getUSSDString(java.lang.String msg) |
protected void |
handleResponse(org.apache.http.HttpResponse response)
Handle response, this checks for choice and sends NTFY if required
|
void |
reset()
Reset( remove local dialog ) in case something goes wrong
|
protected org.apache.http.HttpResponse |
send(byte[] serialized) |
void |
sendNotify(java.lang.String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
java.lang.String userData)
Starts dialog if not already started.
|
void |
sendRequest(java.lang.String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
java.lang.String userData)
Starts dialog if not already started.
|
void |
setIsdn(java.lang.String isdn)
Set the MSISDN where USSD Push is to be sent
|
void |
setTargetUri(java.lang.String uri)
The URI where HTTP Post request is to be submitted.
|
public void setTargetUri(java.lang.String uri)
HTTPPushMBeansetTargetUri in interface HTTPPushMBeanpublic java.lang.String getTargetUri()
HTTPPushMBeangetTargetUri in interface HTTPPushMBeanpublic java.lang.String getIsdn()
HTTPPushMBeangetIsdn in interface HTTPPushMBeanpublic void setIsdn(java.lang.String isdn)
HTTPPushMBeansetIsdn in interface HTTPPushMBeanpublic void reset()
HTTPPushMBeanreset in interface HTTPPushMBeanpublic void sendRequest(java.lang.String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
java.lang.String userData)
throws java.lang.Exception
HTTPPushMBeansendRequest in interface HTTPPushMBeanussdRequest - The actual USSD String requestemptyDialogHandshake - If true, USSD Gateway will first establish Dialog by doing
handshake before sending USSD request. If false the USSD
request will be added in Dialog begin messageinvokeTimeout - Time in milliseconds USSD gateway will wait for user to
respond, if user doesn't respond back within specified time,
USSD Gateway will abort the dialog and send back Abort error
to HTTP AppuserData - User Data to be sent with every request to USSD Gateway which will be
returned back with response from USSD Gw. This is just in case if
application wants to keep some data at Dialog level, for example MSISDNjava.lang.Exceptionpublic void sendNotify(java.lang.String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
java.lang.String userData)
throws java.lang.Exception
HTTPPushMBeansendNotify in interface HTTPPushMBeanussdRequest - The actual USSD String requestemptyDialogHandshake - If true, USSD Gateway will first establish Dialog by doing
handshake before sending USSD request. If false the USSD
request will be added in Dialog begin messageinvokeTimeout - Time in milliseconds USSD gateway will wait for user to
respond, if user doesn't respond back within specified time,
USSD Gateway will abort the dialog and send back Abort error
to HTTP AppuserData - User Data to be sent with every request to USSD Gateway which will be
returned back with response from USSD Gw. This is just in case if
application wants to keep some data at Dialog level, for example MSISDNjava.lang.Exceptionpublic java.lang.String getStatus()
HTTPPushMBeangetStatus in interface HTTPPushMBeanpublic void abort()
throws java.lang.Exception
HTTPPushMBeanabort in interface HTTPPushMBeanjava.lang.Exceptionpublic void close()
throws java.lang.Exception
HTTPPushMBeanclose in interface HTTPPushMBeanjava.lang.Exceptionprotected long getNewID()
protected org.mobicents.protocols.ss7.map.api.primitives.USSDString getUSSDString(java.lang.String msg)
throws org.mobicents.protocols.ss7.map.api.MAPException
org.mobicents.protocols.ss7.map.api.MAPExceptionprotected org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString getISDNAddressString()
protected void addStatusEntry(java.lang.String entry)
protected void establishSession()
protected org.apache.http.HttpResponse send(byte[] serialized)
throws java.lang.Exception
serialized - java.lang.Exceptionprotected void handleResponse(org.apache.http.HttpResponse response)
throws java.lang.Exception
response - java.lang.ExceptionCopyright © 2017. All Rights Reserved.