All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iceberg.iap.vm_iap.Vm_Iap

java.lang.Object
   |
   +----ninja.rmi.NinjaRemoteObject
           |
           +----ninja.ispace.iSpaceService
                   |
                   +----iceberg.iap.IAP
                           |
                           +----iceberg.iap.IAPWithCA
                                   |
                                   +----iceberg.iap.vm_iap.Vm_Iap

public class Vm_Iap
extends IAPWithCA
implements rmi2phone, VMAdminIF, IAPIF, ConnectorMgrIF
IAP for a voice-mail service Can run as an independent program or as an iSpace service. When run as an iSpace service, uses a Call Agent to establish calls. Else, it just uses a simple RMI based signaling to establish calls. To run it as a separate program, make Vm_Iap extend UnicastRemoteObject instead of IAP. Uses the Distribute Hashtable for voice-mail storage. It can also use files for voice-mail storage (decided by #ifdef DDS).


Variable Index

 o ipBSize
The input block size
 o my_vatrec_port
Port to be used by vatrec
 o opBSize
The output block size
 o syncStore
 o VM_ADMIN_IF
The admin RMI interface name

Constructor Index

 o Vm_Iap()

Method Index

 o addUser(String, int)
Add a user to the database
 o beHungUp(CallAgentIF, EndPointInfo)
RMI call from CA to terminate a call.
 o call2phone(rmi2phone_req)
The RMI interface for incoming calls (when not using Call Agent)
 o call2phone(rmi2phone_req, CallAgentIF)
Bulk of the incoming call setup handling code
 o cleanUp(int, OperatorIF, String)
Call for terminating the 'operator'
 o createStartConn(int, OperatorIF, InetAddress, int, String)
This is the call that gives info on the destination of packets from vat.
 o destroy()
Required for running as iSpace service
 o getMsg(int)
 o getMsgInfo(int)
Read message info from MsgHdrsHT
 o getUserInfo(String)
Read the user info in the hashtable VMUsersHT
 o getUserInfoStr(String)
Get user info
 o handleDTMF(CallAgentIF, String, EndPointInfo)
RMI call from call agent for incoming DTMF
 o init(iSpaceServiceConfig)
init for extending iSpaceService.
 o init(String, String, boolean)
The bulk of the init functionality is implemented here
 o loadLocalOperator(int, DescrOperator, String, String)
Call for loading the 'operator'
 o main(String[])
Just calls into init(map_file, iPoPHost, withCA=false)
 o putMsg(byte[], int, int)
Write message in the hashtable MsgsHT
 o putMsgInfo(String, int)
Write message info in the hashtable MsgHdrsHT
 o putUserInfo(String, String)
Write user info in the hashtable VMUsersHT
 o ReadFile(String)
Routine to read bytes from a file
 o rejected(String, String)
RMI call from CA when remote end rejects call
 o removeMsg(int)
Remove msg from hashtable MsgsHT
 o removeMsgInfo(int)
Remove msg info from hashtable MsgHdrsHT
 o removeUserInfo(String)
Remove user info from hashtable
 o ring(CallAgentIF, String, String, String[])
The RMI interface for the CA to call on incoming call.
 o WriteFile(String, byte[], int)
Routine to store a bunch of bytes onto the given file

Variables

 o my_vatrec_port
 public static int my_vatrec_port
Port to be used by vatrec

 o VM_ADMIN_IF
 public static final String VM_ADMIN_IF
The admin RMI interface name

 o ipBSize
 public static int ipBSize
The input block size

 o opBSize
 public static int opBSize
The output block size

 o syncStore
 public static Vm_Iap. SyncStoreClass syncStore

Constructors

 o Vm_Iap
 public Vm_Iap() throws RemoteException

Methods

 o getUserInfo
 public static VMUserInfo getUserInfo(String uid) throws HTException
Read the user info in the hashtable VMUsersHT

 o putUserInfo
 public static void putUserInfo(String infoStr,
                                String uid) throws HTException
Write user info in the hashtable VMUsersHT

 o removeUserInfo
 public static void removeUserInfo(String uid) throws HTException
Remove user info from hashtable

 o getMsgInfo
 public static MsgInfo getMsgInfo(int msgId) throws HTException
Read message info from MsgHdrsHT

 o putMsgInfo
 public static void putMsgInfo(String info,
                               int msgId) throws HTException
Write message info in the hashtable MsgHdrsHT

 o removeMsgInfo
 public static void removeMsgInfo(int msgId) throws HTException
Remove msg info from hashtable MsgHdrsHT

 o getMsg
 public static byte[] getMsg(int msgId) throws HTException
 o putMsg
 public static void putMsg(byte bytes[],
                           int len,
                           int msgId) throws HTException
Write message in the hashtable MsgsHT

 o removeMsg
 public static void removeMsg(int msgId) throws HTException
Remove msg from hashtable MsgsHT

 o WriteFile
 public static void WriteFile(String fname,
                              byte data[],
                              int len) throws HTException
Routine to store a bunch of bytes onto the given file

 o ReadFile
 public static byte[] ReadFile(String fname) throws HTException
Routine to read bytes from a file

 o call2phone
 public rmi2phone_rep call2phone(rmi2phone_req req) throws RemoteException
The RMI interface for incoming calls (when not using Call Agent)

 o call2phone
 public rmi2phone_rep call2phone(rmi2phone_req req,
                                 CallAgentIF ca) throws RemoteException
Bulk of the incoming call setup handling code

 o ring
 public RingReply ring(CallAgentIF ca,
                       String callerID,
                       String netSpecID,
                       String others[]) throws RemoteException
The RMI interface for the CA to call on incoming call. This just calls call2phone with the appropriate transformation of args and return value.

Overrides:
ring in class IAPWithCA
 o beHungUp
 public void beHungUp(CallAgentIF ca,
                      EndPointInfo info) throws RemoteException
RMI call from CA to terminate a call. This just calls call2phone with the appropriate transformation of args.

Overrides:
beHungUp in class IAPWithCA
 o rejected
 public void rejected(String calleeAddr,
                      String pathInfo) throws RemoteException
RMI call from CA when remote end rejects call

Overrides:
rejected in class IAPWithCA
 o handleDTMF
 public void handleDTMF(CallAgentIF ca,
                        String tone,
                        EndPointInfo info) throws RemoteException
RMI call from call agent for incoming DTMF

Overrides:
handleDTMF in class IAP
 o init
 public void init(iSpaceServiceConfig config)
init for extending iSpaceService. Just calls into init(map_file, iPoPHost, withCA=true)

Overrides:
init in class IAP
 o main
 public static void main(String argv[])
Just calls into init(map_file, iPoPHost, withCA=false)

 o init
 public static void init(String map_file,
                         String iPoPHost,
                         boolean withCA)
The bulk of the init functionality is implemented here

 o destroy
 protected void destroy()
Required for running as iSpace service

Overrides:
destroy in class iSpaceService
 o addUser
 public boolean addUser(String uid,
                        int quota) throws RemoteException, VMAdminException
Add a user to the database

 o getUserInfoStr
 public String getUserInfoStr(String uid) throws RemoteException, HTException
Get user info

 o loadLocalOperator
 public OperatorIF loadLocalOperator(int pathid,
                                     DescrOperator thedescr,
                                     String name,
                                     String callid) throws ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, IOException, RemoteException
Call for loading the 'operator'

Overrides:
loadLocalOperator in class IAPWithCA
 o createStartConn
 public ConnEntry createStartConn(int connType,
                                  OperatorIF opSource,
                                  InetAddress addr,
                                  int port,
                                  String callid) throws RemoteException, IOException
This is the call that gives info on the destination of packets from vat.

Overrides:
createStartConn in class IAPWithCA
 o cleanUp
 public void cleanUp(int pathid,
                     OperatorIF op,
                     String callid) throws RemoteException
Call for terminating the 'operator'

Overrides:
cleanUp in class IAPWithCA

All Packages  Class Hierarchy  This Package  Previous  Next  Index