Class GatewayListener

(line 28)
Base
   |
   --GatewayListener

Located in File: Program_Root/sdk/GatewayListener.php


$Id: GatewayListener.php,v 1.1.1.1 2003/03/27 10:27:42 maro Exp $

This class connects to the gateway and listens for incoming SMS and notifications.

When an SMS message arrives the method 'onSMSReceive' is called with the actual SMS object, which makes it possible to process the incoming SMS however you want, save to db or whatever you like.

When a notification arrives the method 'onNotificationReceive' is called with the actual Notification object, which makes it possible to process the notification as you like.


Class Variable Summary
$server
Default Value: -><-

Inherited Class Variable Summary
Inherited From Class Base
Variable Default Value Description
Base::$clazz -> <-
Base::$logFile -> _DEBUG_FILE <-
Base::$loglevel -> _DEBUG_LEVEL <- debug - logstatements above and including 'debug' are printed.
Base::$loglevels ->array ("debug" => 0, "info" => 1, "warn" => 2, "fatal" => 3) <-
Base::$logoutput -> _DEBUG_OUTPUT <- 0 - log to screen
Base::$method -> <-

Method Summary
void constructor GatewayListener ( )
Initializes the class
void onNotificationReceive ( $notification )
Called when a Notification is received. As specified in the XML/TCP adapter documentation, an incoming Notification must be acknowledged. This is achieved by creating a sdk.protocol.receive.Response object and send it back to the gateway.
void onSMSReceive ( $sms )
Called when an SMS is received. As specified in the XML/TCP adapter documentation, an incoming SMS must be acknowledged. This is achieved by creating a sdk.protocol.receive.Response object and send it back to the gateway.
void run ( )
Starts the GatewayListener and listens for incoming SMS and
Inherited Method Summary
Inherited From Class Base
Function Description
Base::Base()
Base::dbg()
Base::formatLongDate()
Base::formatLongDateTime()
Base::formatShortDate()
Base::formatShortDateTime()
Base::logDebug()
Base::logFatal()
Base::logInfo()
Base::logWarn()
Base::registerClass()
Base::registerMethod()
Base::setLoglevel()
Base::toFile()
Base::toScreen()

Method Detail

Constructor GatewayListener

(line 40)

void GatewayListener( )

Initializes the class
Function Info:

[ Top ]


onNotificationReceive

(line 92)

void onNotificationReceive( Notification $notification)

Called when a Notification is received. As specified in the XML/TCP adapter documentation, an incoming Notification must be acknowledged. This is achieved by creating a sdk.protocol.receive.Response object and send it back to the gateway.
Function Parameters:
- Notification $notification:
Function Info:
see - Response

[ Top ]


onSMSReceive

(line 67)

void onSMSReceive( Sms $sms)

Called when an SMS is received. As specified in the XML/TCP adapter documentation, an incoming SMS must be acknowledged. This is achieved by creating a sdk.protocol.receive.Response object and send it back to the gateway.
Function Parameters:
- Sms $sms: the received SMS message.
Function Info:
see - Response

[ Top ]


run

(line 51)

void run( )

Starts the GatewayListener and listens for incoming SMS and

Notifications. Connects to the gateway by opening a socket to '_LISTENER_HOST' and port '_LISTENER_PORT' found in 'config.inc'

Function Info:
see - config.inc

[ Top ]



Variable Detail

$server

(line 35)
Data type: mixed

[ Top ]



Documention generated on Mon, 31 Mar 2003 10:17:44 +0200 by phpDocumentor 1.2.0rc1