sdt.mediator
Class SessionManagerInternal

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by sdt.mediator.SessionManagerInternal
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, sdt.ext.interfaces.SDT_Client_URI_I, ISessionManager
Direct Known Subclasses:
SDT

public class SessionManagerInternal
extends java.rmi.server.UnicastRemoteObject
implements sdt.ext.interfaces.SDT_Client_URI_I, ISessionManager

Each application creates a single session manager to manage its sessions.

See Also:
Serialized Form

Method Summary
 Session addSession_aux(sdt.ext.interfaces.NotificationType m)
          create a new session.
 Session addSession()
          create a new session.
 Session addSessionDirect()
           
 void control(sdt.ext.interfaces.PartyInBridgeURI party, java.lang.String input)
          If a session is started in Network mode (see SDT_Manager_URI_I), all events for that session are sent directly to the application as control messages.
 void disconnect()
          called this at program exit.
 void dropSession(Session s)
          drop an existing session.
 java.util.Set<Session> getSessions()
          get set of sessions being managed
 boolean invite(sdt.ext.interfaces.PartyURI caller, sdt.ext.interfaces.PartyURI callee)
          passes up a call attempt intercepted by the network.
 void notify(sdt.ext.interfaces.SessionURI session, java.util.UUID condition, sdt.ext.interfaces.IPredicate.Binding[] ps)
          a notification for a particular condition
 sdt.ext.interfaces.Response notifywait(sdt.ext.interfaces.SessionURI session, java.util.UUID condition, sdt.ext.interfaces.IPredicate.Binding[] ps)
          a notify-wait
 int numSessions()
          find out how many sessions are being managed
 void register(sdt.ext.interfaces.PartyURI caller)
          a network user registration
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

invite

public boolean invite(sdt.ext.interfaces.PartyURI caller,
                      sdt.ext.interfaces.PartyURI callee)
               throws java.rmi.RemoteException
Description copied from interface: sdt.ext.interfaces.SDT_Client_URI_I
passes up a call attempt intercepted by the network.

Specified by:
invite in interface sdt.ext.interfaces.SDT_Client_URI_I
Returns:
the return value "true" indicates that the application takes responsibility for handling the call. (The application may do anything, including dropping the call.) The application must not add either the caller or the callee to a bubble if its return value is "false"; doing so can result in arbitrary behavior.
Throws:
java.rmi.RemoteException

register

public void register(sdt.ext.interfaces.PartyURI caller)
              throws java.rmi.RemoteException
Description copied from interface: sdt.ext.interfaces.SDT_Client_URI_I
a network user registration

Specified by:
register in interface sdt.ext.interfaces.SDT_Client_URI_I
Throws:
java.rmi.RemoteException

notify

public void notify(sdt.ext.interfaces.SessionURI session,
                   java.util.UUID condition,
                   sdt.ext.interfaces.IPredicate.Binding[] ps)
            throws java.rmi.RemoteException
a notification for a particular condition

Specified by:
notify in interface sdt.ext.interfaces.SDT_Client_URI_I
Throws:
java.rmi.RemoteException

notifywait

public sdt.ext.interfaces.Response notifywait(sdt.ext.interfaces.SessionURI session,
                                              java.util.UUID condition,
                                              sdt.ext.interfaces.IPredicate.Binding[] ps)
                                       throws java.rmi.RemoteException
a notify-wait

Specified by:
notifywait in interface sdt.ext.interfaces.SDT_Client_URI_I
Throws:
java.rmi.RemoteException

addSession_aux

public Session addSession_aux(sdt.ext.interfaces.NotificationType m)
                       throws SDTException
create a new session. Contact the true SM to create a session, and make a proxy object with the returned session id. The session is initially empty, i.e., it has no bubbles or triggers associated with it.

Returns:
newly created session
Throws:
SDTException

addSession

public Session addSession()
                   throws SDTException
Description copied from interface: ISessionManager
create a new session. The session is initially empty, i.e., it has no bubbles or triggers associated with it.

Specified by:
addSession in interface ISessionManager
Returns:
newly created session
Throws:
SDTException

addSessionDirect

public Session addSessionDirect()
                         throws SDTException
Throws:
SDTException

dropSession

public void dropSession(Session s)
                 throws SDTException
drop an existing session.

Throws:
SDTException

getSessions

public java.util.Set<Session> getSessions()
                                   throws SDTException
get set of sessions being managed

Specified by:
getSessions in interface ISessionManager
Throws:
SDTException

numSessions

public int numSessions()
                throws SDTException
find out how many sessions are being managed

Specified by:
numSessions in interface ISessionManager
Throws:
SDTException

control

public void control(sdt.ext.interfaces.PartyInBridgeURI party,
                    java.lang.String input)
             throws java.rmi.RemoteException
Description copied from interface: sdt.ext.interfaces.SDT_Client_URI_I
If a session is started in Network mode (see SDT_Manager_URI_I), all events for that session are sent directly to the application as control messages.

Specified by:
control in interface sdt.ext.interfaces.SDT_Client_URI_I
Throws:
java.rmi.RemoteException

disconnect

public void disconnect()
called this at program exit. deletes any active sessions.

Specified by:
disconnect in interface ISessionManager