public class HTTPPush extends Object implements HTTPPushMBean
| Constructor and Description |
|---|
HTTPPush() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
USER Abort the underlying MAP Dialog
|
protected void |
addStatusEntry(String entry) |
void |
close()
Close the underlying MAP Dialog.
|
protected void |
establishSession() |
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() |
String |
getStatus()
Return current status of service - what has been sent, what has been
received etc.
|
String |
getTargetUri()
Get the URI pointing to USSD Gateway for push
|
protected org.mobicents.protocols.ss7.map.api.primitives.USSDString |
getUSSDString(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(String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
String userData)
Starts dialog if not already started.
|
void |
sendRequest(String ussdRequest,
boolean emptyDialogHandshake,
int invokeTimeout,
String userData)
Starts dialog if not already started.
|
void |
setIsdn(String isdn)
Set the MSISDN where USSD Push is to be sent
|
void |
setTargetUri(String uri)
The URI where HTTP Post request is to be submitted.
|
public void setTargetUri(String uri)
HTTPPushMBeansetTargetUri in interface HTTPPushMBeanpublic String getTargetUri()
HTTPPushMBeangetTargetUri in interface HTTPPushMBeanpublic String getIsdn()
HTTPPushMBeangetIsdn in interface HTTPPushMBeanpublic void setIsdn(String isdn)
HTTPPushMBeansetIsdn in interface HTTPPushMBeanpublic void reset()
HTTPPushMBeanreset in interface HTTPPushMBeanpublic void sendRequest(String ussdRequest, boolean emptyDialogHandshake, int invokeTimeout, String userData) throws 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 MSISDNExceptionpublic void sendNotify(String ussdRequest, boolean emptyDialogHandshake, int invokeTimeout, String userData) throws 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 MSISDNExceptionpublic String getStatus()
HTTPPushMBeangetStatus in interface HTTPPushMBeanpublic void abort()
throws Exception
HTTPPushMBeanabort in interface HTTPPushMBeanExceptionpublic void close()
throws Exception
HTTPPushMBeanclose in interface HTTPPushMBeanExceptionprotected long getNewID()
protected org.mobicents.protocols.ss7.map.api.primitives.USSDString getUSSDString(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(String entry)
protected void establishSession()
protected org.apache.http.HttpResponse send(byte[] serialized)
throws Exception
serialized - ExceptionCopyright © 2016. All Rights Reserved.