private void ChangeState(SmppSessionState newState) { lock (_vSyncRoot) { _vState = newState; } }
/// <summary> /// This is the entrypoint which is called by the session object to dispatch /// a given PDU to the handler. /// </summary> /// <param name="state"></param> /// <param name="pdu"></param> /// <returns></returns> public static bool Dispatch(SmppSessionState state, SmppPdu pdu) { // Quick validation of the received PDU; make sure the command id matches up // to the type of PDU received and that we have a handler. if (typeMap_.ContainsKey(pdu.CommandId)) { PduHandler handler = typeMap_[pdu.CommandId]; try { handler.InternalDispatch(state, pdu); return(true); } catch (InvalidCastException) { } } return(false); }
/// <summary> /// This method must be overridden in implementations to cast the PDU /// to a concrete type and call the appropriate session state method. /// </summary> /// <param name="state">Session state</param> /// <param name="pdu">PDU</param> /// <returns></returns> public virtual void InternalDispatch(SmppSessionState state, SmppPdu pdu) { throw new NotImplementedException(); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((list_dls)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((enquire_sub)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((cancel_broadcast_sm)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((submit_multi)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((bind_transceiver_resp)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((replace_sm)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((deliver_sm_resp)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((generic_nack)pdu); }
public override void InternalDispatch(SmppSessionState state, SmppPdu pdu) { state.Process((alert_notification)pdu); }