zyneo.sms.gateway.adaptor.xml.tcp.client
Class ReceiveConnection

java.lang.Object
  |
  +--zyneo.sms.gateway.adaptor.xml.tcp.client.ReceiveConnection

public class ReceiveConnection
extends java.lang.Object

Receives a Status report or Sms-message

Author:
Niklas Andersson

Field Summary
protected  ServerConnection m_con
           
protected  int m_framedelay
           
protected  java.lang.String m_host
           
protected  Category m_log
           
protected  int m_port
           
 
Constructor Summary
ReceiveConnection(java.lang.String host, int port)
          Constructor
ReceiveConnection(java.lang.String host, int port, int framedelay)
          Constructor
 
Method Summary
 java.lang.Object receive()
          Receives one Sms or Status report, if none availible this method will block.
 java.lang.Object receivenb(int n)
          Receives one Sms or Notification, if none availible then this method will block for the timeout specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_host

protected java.lang.String m_host

m_port

protected int m_port

m_framedelay

protected int m_framedelay

m_con

protected ServerConnection m_con

m_log

protected Category m_log
Constructor Detail

ReceiveConnection

public ReceiveConnection(java.lang.String host,
                         int port)
Constructor

Parameters:
host - Running the gateway
port - Tcp-port on which the XML/tcp Receive Adaptor listens.

ReceiveConnection

public ReceiveConnection(java.lang.String host,
                         int port,
                         int framedelay)
Constructor

Parameters:
host - Running the gateway
port - Tcp-port on which the XML/tcp Receive Adaptor listens.
framedelay - The maximum time between two bytes in an xml-frame.
Method Detail

receive

public java.lang.Object receive()
                         throws RequestException,
                                java.io.IOException,
                                java.net.UnknownHostException
Receives one Sms or Status report, if none availible this method will block.

Returns:
Sms or Notification
Throws:
RequestException,IOException,UnknownHostException
RequestException
java.io.IOException
java.net.UnknownHostException

receivenb

public java.lang.Object receivenb(int n)
                           throws RequestException,
                                  java.io.IOException,
                                  java.net.UnknownHostException
Receives one Sms or Notification, if none availible then this method will block for the timeout specified.

Parameters:
n - Timeout in milliseconds to wait
Throws:
RequestException,IOException,UnknownHostException
RequestException
java.io.IOException
java.net.UnknownHostException


Copyright © 2002 Zyneo. All Rights Reserved.