org.mobicents.slee.resources.smpp
Class SmppSessionImpl
java.lang.Object
org.mobicents.slee.resources.smpp.SmppSessionImpl
- All Implemented Interfaces:
- SmppSession
public class SmppSessionImpl
- extends java.lang.Object
- implements SmppSession
- Author:
- amit bhayani
|
Field Summary |
protected java.util.concurrent.ScheduledExecutorService |
timer
|
|
Method Summary |
AbsoluteSMPPDate |
createAbsoluteSMPPDate(java.util.Calendar calendar,
boolean hasTz)
|
Address |
createAddress(int addTon,
int addNpi,
java.lang.String address)
|
RelativeSMPPDate |
createRelativeSMPPDate(int years,
int months,
int days,
int hours,
int minutes,
int seconds)
|
SmppRequest |
createSmppRequest(int commandId)
|
SmppTransaction |
createTransaction(SmppRequest request)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getSessionId()
|
protected SmppTransactionImpl |
getSmppTransactionImpl(PDU pdu,
boolean createActivity,
SmppTransactionType txType)
This method will return the existing SmppTransaction (Activity) if
already exist else create new if creayeActivity is true. |
java.lang.String |
getSMSCHost()
|
int |
getSMSPort()
|
int |
hashCode()
|
boolean |
isAlive()
|
void |
sendRequest(SmppRequest request)
|
void |
sendResponse(SmppTransaction txn,
SmppResponse response)
|
protected void |
setIsAlive(boolean isAlive)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
timer
protected java.util.concurrent.ScheduledExecutorService timer
SmppSessionImpl
public SmppSessionImpl(SmppResourceAdaptor smppResourceAdaptor)
createAddress
public Address createAddress(int addTon,
int addNpi,
java.lang.String address)
- Specified by:
createAddress in interface SmppSession
createSmppRequest
public SmppRequest createSmppRequest(int commandId)
- Specified by:
createSmppRequest in interface SmppSession
createAbsoluteSMPPDate
public AbsoluteSMPPDate createAbsoluteSMPPDate(java.util.Calendar calendar,
boolean hasTz)
- Specified by:
createAbsoluteSMPPDate in interface SmppSession
createRelativeSMPPDate
public RelativeSMPPDate createRelativeSMPPDate(int years,
int months,
int days,
int hours,
int minutes,
int seconds)
- Specified by:
createRelativeSMPPDate in interface SmppSession
getSMSCHost
public java.lang.String getSMSCHost()
- Specified by:
getSMSCHost in interface SmppSession
getSMSPort
public int getSMSPort()
- Specified by:
getSMSPort in interface SmppSession
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionId in interface SmppSession
isAlive
public boolean isAlive()
- Specified by:
isAlive in interface SmppSession
createTransaction
public SmppTransaction createTransaction(SmppRequest request)
- Specified by:
createTransaction in interface SmppSession
sendRequest
public void sendRequest(SmppRequest request)
throws java.lang.IllegalStateException,
java.lang.NullPointerException,
java.io.IOException
- Specified by:
sendRequest in interface SmppSession
- Throws:
java.lang.IllegalStateException
java.lang.NullPointerException
java.io.IOException
sendResponse
public void sendResponse(SmppTransaction txn,
SmppResponse response)
throws java.lang.IllegalStateException,
java.lang.NullPointerException,
java.io.IOException
- Specified by:
sendResponse in interface SmppSession
- Throws:
java.lang.IllegalStateException
java.lang.NullPointerException
java.io.IOException
setIsAlive
protected void setIsAlive(boolean isAlive)
getSmppTransactionImpl
protected SmppTransactionImpl getSmppTransactionImpl(PDU pdu,
boolean createActivity,
SmppTransactionType txType)
- This method will return the existing SmppTransaction (Activity) if
already exist else create new if creayeActivity is true. If already exist
we remove it from transactions Map as this Tx life is only till response
is received back
- Parameters:
pdu - createActivity - requestReceived -
- Returns:
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
Copyright © 2011. All Rights Reserved.