com.esf.net.ppp.service
Interface IPppService


public interface IPppService

Defines PPP service interface provided to user application.

Author:
ilya.binshtok

Field Summary
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 void connect()
          Establishes PPP connection with a service provider
 void disconnect()
          Terminates PPP connection
 java.lang.String getIPaddress()
          Reports IP address assigned to the ppp0 interface
 PppPeer getPeer()
          Answers current PPP peer object
 java.lang.String getPeerIPaddress()
          Reports IP address of the peer
 boolean isConnectionInProgress()
          Reports if PPP connection is in progress.
 boolean isUp()
          Reports if PPP is up
 void setPeer(PppPeer peer)
          Sets PPP peer object
 void setSerialPort(java.lang.String port)
          Sets serial port that is used to establish PPP connection
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.

Method Detail

connect

void connect()
             throws java.lang.Exception
Establishes PPP connection with a service provider

Throws:
java.lang.Exception

disconnect

void disconnect()
                throws java.lang.Exception
Terminates PPP connection

Throws:
java.lang.Exception

setSerialPort

void setSerialPort(java.lang.String port)
Sets serial port that is used to establish PPP connection

Parameters:
port - - serial port (e.g. /dev/ttyUSB0)

getPeer

PppPeer getPeer()
Answers current PPP peer object

Returns:
PPP peer object

setPeer

void setPeer(PppPeer peer)
             throws java.lang.Exception
Sets PPP peer object

Parameters:
peer - - PPP peer object
Throws:
java.lang.Exception

isUp

boolean isUp()
             throws java.lang.Exception
Reports if PPP is up

Returns:
true - PPP is up
false - PPP is down
Throws:
java.lang.Exception

isConnectionInProgress

boolean isConnectionInProgress()
                               throws java.lang.Exception
Reports if PPP connection is in progress.

Returns:
true - PPP connection is in progress
false - PPP connection is not in progress
Throws:
java.lang.Exception

getIPaddress

java.lang.String getIPaddress()
                              throws java.lang.Exception
Reports IP address assigned to the ppp0 interface

Returns:
IP address
Throws:
java.lang.Exception

getPeerIPaddress

java.lang.String getPeerIPaddress()
                                  throws java.lang.Exception
Reports IP address of the peer

Returns:
IP address
Throws:
java.lang.Exception