All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.Habanero

java.lang.Object
   |
   +----ncsa.habanero.Habanero

public class Habanero
extends Object
The SessionManager is intended to be a high-level construct that keeps track of a client's Sessions and presents an interface to other SessionManagers and to Neighborhoods. It keeps a list of sessions in a dictionary, keyed by the session Identifier. There is only one SessionManager per invocation of Habanero. It also responds to server requests, like "create a new session" which logically cannot be sent to objects lower in the hierarchy and to requests from other SessionManagers such as "dump a session"


Constructor Index

 o Habanero()

Method Index

 o addSession(Session)
Add the given session to my list.
 o addSharedEventType(Class, int, Mirrorable)
 o addSharedEventType(Class, Mirrorable)
 o addShippingDecision(ShippingDecisionFunction, Mirrorable)
 o doWait()
 o dumpSharable(MarshallInput, MarshallOutput)
This method is called when a SessionManager is asked to dump the state of either a Session or a Collobject.
 o dumpSharable(Sharable, String, MarshallOutput)
This method is called when a SessionManager is asked to dump the state of either a Session or a Collobject.
 o findHabaneroFrame(Component)
 o findMirrorableAncestor(Component)
 o findSharable(Object)
 o FindSpecified(ObjectInput)
 o FindSpecified(Specifier)
 o FindSpecifiedObject(ObjectInput)
 o FindSpecifiedObject(Specifier)
 o getClipboard()
 o getCollaborativeEnvironment()
 o getCurrentArg()
 o getDebug()
 o getEnvAsEnvironmentAware()
 o getEnvAsParticipantsAware()
 o getEnvAsSessionsAware()
 o getEnvAsToolsAware()
 o getEnvAsWarningAware()
 o getLatestNeighborhood()
 o getLockFile()
 o getLockOwner()
 o getReplayController()
 o getSource()
 o good()
 o id()
Returns the id of this object, which is the hostname + listening port.
 o initiateSession(SessionInfo)
This is called by a client to start a session of the given name on a given address/port.
 o invited(MarshallInput, MarshallOutput)
 o isEnvironmentInterface(String)
 o isInterface(Object, String)
 o isLocalEvent()
 o joinSession(String, String, int)
This is called by a client to join a session of the given name on a given address/port.
 o joinSessionRequested(MarshallInput, MarshallOutput)
When a client asks to join an existing session, this routine writes back the session's owner object, which is where the client goes to get the session's data.
 o joinSessionWithAuthentication(String, String, int, int, String)
This is called by a client to join a session of the given name on a given address/port.
 o joinSessionWithAuthenticationRequested(MarshallInput, MarshallOutput)
When a client asks to join an existing session, this routine writes back the session's owner object, which is where the client goes to get the session's data.
 o makeManager(Vector)
 o makeManager(Vector, boolean, String)
 o makeParticipant(String, int)
 o odoNotify()
 o owner()
Returns the owner of this object.
 o print(boolean)
 o print(char)
 o print(int)
 o print(long)
 o print(Object)
 o println(boolean)
 o println(char)
 o println(int)
 o println(long)
 o println(Object)
 o returnInvitation(SessionInfo, String)
 o run()
Listen until someone makes a connection.
 o sendBeep(SessionParticipant)
 o sendEvent(Action, Sharable)
 o sendEvent(AWTEvent)
 o sendEvent(AWTEvent, Object)
 o sendEvent(ComponentAction)
 o sendEvent(Event, Sharable)
 o sendKeyedEvent(AWTEvent, Key)
 o sendKeyedEvent(AWTEvent, Object, Key)
 o sendKeyedEvent(ComponentAction, Key)
 o setClipboard(ImagePrimitiveP)
 o setCollaborativeEnvironment(Object)
 o setDebug(boolean)
 o setLatestNeighborhood(String)
 o setLockFile(String)
 o setLockOwner(boolean)
 o setReplay(ReplayController)
 o setSingleConnection()
 o stop()
 o useMultipleConnections()

Constructors

 o Habanero
 public Habanero()

Methods

 o setLockFile
 public static void setLockFile(String filename)
 o getLockFile
 public static String getLockFile()
 o setLockOwner
 public static void setLockOwner(boolean b)
 o getLockOwner
 public static boolean getLockOwner()
 o isLocalEvent
 public static boolean isLocalEvent()
 o getCurrentArg
 public static Object getCurrentArg()
 o getSource
 public static Object getSource()
 o run
 public static void run()
Listen until someone makes a connection. Read the request, call a a routine to execute it. Close the connection.

 o stop
 public static void stop()
 o useMultipleConnections
 public static boolean useMultipleConnections()
 o setSingleConnection
 public static void setSingleConnection()
 o findHabaneroFrame
 public static HabaneroFrame findHabaneroFrame(Component c)
 o findMirrorableAncestor
 public static Mirrorable findMirrorableAncestor(Component c)
 o findSharable
 public static Sharable findSharable(Object src)
 o addSharedEventType
 public static void addSharedEventType(Class eventType,
                                       Mirrorable m)
 o addSharedEventType
 public static void addSharedEventType(Class eventType,
                                       int id,
                                       Mirrorable m)
 o addShippingDecision
 public static void addShippingDecision(ShippingDecisionFunction fn,
                                        Mirrorable m)
 o addSession
 public static void addSession(Session toAdd)
Add the given session to my list. Will be called when a user creates a new session as well as when a user joins a remote session.

Parameters:
toAdd - the new session
owner - who has rights to determine access to the session
 o owner
 public static SessionParticipant owner()
Returns the owner of this object.

 o id
 public static String id()
Returns the id of this object, which is the hostname + listening port.

 o invited
 public static void invited(MarshallInput in,
                            MarshallOutput out)
 o returnInvitation
 public static void returnInvitation(SessionInfo info,
                                     String neighborhood)
 o joinSessionRequested
 public static void joinSessionRequested(MarshallInput in,
                                         MarshallOutput out)
When a client asks to join an existing session, this routine writes back the session's owner object, which is where the client goes to get the session's data. It also adds the client to the session's list of participants. This is a server-side method.

 o joinSessionWithAuthenticationRequested
 public static void joinSessionWithAuthenticationRequested(MarshallInput in,
                                                           MarshallOutput out)
When a client asks to join an existing session, this routine writes back the session's owner object, which is where the client goes to get the session's data. It also adds the client to the session's list of participants. This is a server-side method.

 o initiateSession
 public static Session initiateSession(SessionInfo is)
This is called by a client to start a session of the given name on a given address/port. It makes a connection to the server, writes out the new session request, and gets back the port of the session arbitrator. Then it creates a new session object as its child.

 o joinSession
 public static Session joinSession(String sessionName,
                                   String serverName,
                                   int serverPort)
This is called by a client to join a session of the given name on a given address/port. It makes a connection to the server, writes out the join session request, and gets back the object referring to the owner of that session. It then contacts that owner's SessionManager and asks it to dump the state of the session. It unmarshalls and returns the session.

 o joinSessionWithAuthentication
 public static Session joinSessionWithAuthentication(String sessionName,
                                                     String serverName,
                                                     int serverPort,
                                                     int type,
                                                     String authentication)
This is called by a client to join a session of the given name on a given address/port. It makes a connection to the server, writes out the join session request, and gets back the object referring to the owner of that session. It then contacts that owner's SessionManager and asks it to dump the state of the session. It unmarshalls and returns the session.

 o dumpSharable
 public static void dumpSharable(MarshallInput in,
                                 MarshallOutput out)
This method is called when a SessionManager is asked to dump the state of either a Session or a Collobject.

 o dumpSharable
 public static void dumpSharable(Sharable shar,
                                 String toWho,
                                 MarshallOutput out)
This method is called when a SessionManager is asked to dump the state of either a Session or a Collobject.

 o good
 public static boolean good()
 o doWait
 public static void doWait()
 o odoNotify
 public static void odoNotify()
 o setLatestNeighborhood
 public static void setLatestNeighborhood(String hood)
 o getLatestNeighborhood
 public static String getLatestNeighborhood()
 o setClipboard
 public static void setClipboard(ImagePrimitiveP clipboard)
 o getClipboard
 public static ImagePrimitiveP getClipboard()
 o sendBeep
 public static void sendBeep(SessionParticipant p)
 o sendEvent
 public static boolean sendEvent(ComponentAction event)
 o sendEvent
 public static boolean sendEvent(AWTEvent event)
 o sendEvent
 public static boolean sendEvent(AWTEvent event,
                                 Object arg)
 o sendKeyedEvent
 public static boolean sendKeyedEvent(AWTEvent event,
                                      Key key)
 o sendKeyedEvent
 public static boolean sendKeyedEvent(ComponentAction event,
                                      Key key)
 o sendKeyedEvent
 public static boolean sendKeyedEvent(AWTEvent event,
                                      Object arg,
                                      Key key)
 o sendEvent
 public static boolean sendEvent(Event event,
                                 Sharable s)
 o sendEvent
 public static boolean sendEvent(Action event,
                                 Sharable s)
 o getReplayController
 public static ReplayController getReplayController()
Returns:
returns the replay object for the user
 o setReplay
 public static void setReplay(ReplayController newReplayController)
Parameters:
newReplayController - the new replay controller
Returns:
sets the replay controller
 o FindSpecified
 public static Specifiable FindSpecified(Specifier inSpecifier)
 o FindSpecified
 public static Specifiable FindSpecified(ObjectInput in)
 o FindSpecifiedObject
 public static ModelObject FindSpecifiedObject(ObjectInput in)
 o FindSpecifiedObject
 public static ModelObject FindSpecifiedObject(Specifier inSpecifier)
 o setDebug
 public static void setDebug(boolean d)
 o getDebug
 public static boolean getDebug()
 o println
 public static void println(Object s)
 o println
 public static void println(int s)
 o println
 public static void println(long s)
 o println
 public static void println(boolean s)
 o println
 public static void println(char s)
 o print
 public static void print(Object s)
 o print
 public static void print(long s)
 o print
 public static void print(int s)
 o print
 public static void print(boolean s)
 o print
 public static void print(char s)
 o setCollaborativeEnvironment
 public static void setCollaborativeEnvironment(Object e)
 o getCollaborativeEnvironment
 public static Object getCollaborativeEnvironment()
 o isInterface
 public static boolean isInterface(Object object,
                                   String className)
 o isEnvironmentInterface
 public static boolean isEnvironmentInterface(String className)
 o getEnvAsWarningAware
 public static WarningAware getEnvAsWarningAware()
 o getEnvAsSessionsAware
 public static SessionsAware getEnvAsSessionsAware()
 o getEnvAsParticipantsAware
 public static ParticipantsAware getEnvAsParticipantsAware()
 o getEnvAsToolsAware
 public static ToolsAware getEnvAsToolsAware()
 o getEnvAsEnvironmentAware
 public static EnvironmentAware getEnvAsEnvironmentAware()
 o makeManager
 public static void makeManager(Vector listeningPort) throws Exception
 o makeManager
 public static void makeManager(Vector listeningPort,
                                boolean url,
                                String location) throws Exception
 o makeParticipant
 public static SessionParticipant makeParticipant(String host,
                                                  int port)

All Packages  Class Hierarchy  This Package  Previous  Next  Index