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"
-
Habanero()
-
-
addSession(Session)
- Add the given session to my list.
-
addSharedEventType(Class, int, Mirrorable)
-
-
addSharedEventType(Class, Mirrorable)
-
-
addShippingDecision(ShippingDecisionFunction, Mirrorable)
-
-
doWait()
-
-
dumpSharable(MarshallInput, MarshallOutput)
- This method is called when a SessionManager is asked to dump the state
of either a Session or a Collobject.
-
dumpSharable(Sharable, String, MarshallOutput)
- This method is called when a SessionManager is asked to dump the state
of either a Session or a Collobject.
-
findHabaneroFrame(Component)
-
-
findMirrorableAncestor(Component)
-
-
findSharable(Object)
-
-
FindSpecified(ObjectInput)
-
-
FindSpecified(Specifier)
-
-
FindSpecifiedObject(ObjectInput)
-
-
FindSpecifiedObject(Specifier)
-
-
getClipboard()
-
-
getCollaborativeEnvironment()
-
-
getCurrentArg()
-
-
getDebug()
-
-
getEnvAsEnvironmentAware()
-
-
getEnvAsParticipantsAware()
-
-
getEnvAsSessionsAware()
-
-
getEnvAsToolsAware()
-
-
getEnvAsWarningAware()
-
-
getLatestNeighborhood()
-
-
getLockFile()
-
-
getLockOwner()
-
-
getReplayController()
-
-
getSource()
-
-
good()
-
-
id()
- Returns the id of this object, which is the hostname + listening port.
-
initiateSession(SessionInfo)
- This is called by a client to start a session of the given name on a
given address/port.
-
invited(MarshallInput, MarshallOutput)
-
-
isEnvironmentInterface(String)
-
-
isInterface(Object, String)
-
-
isLocalEvent()
-
-
joinSession(String, String, int)
- This is called by a client to join a session of the given name on a
given address/port.
-
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.
-
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.
-
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.
-
makeManager(Vector)
-
-
makeManager(Vector, boolean, String)
-
-
makeParticipant(String, int)
-
-
odoNotify()
-
-
owner()
- Returns the owner of this object.
-
print(boolean)
-
-
print(char)
-
-
print(int)
-
-
print(long)
-
-
print(Object)
-
-
println(boolean)
-
-
println(char)
-
-
println(int)
-
-
println(long)
-
-
println(Object)
-
-
returnInvitation(SessionInfo, String)
-
-
run()
- Listen until someone makes a connection.
-
sendBeep(SessionParticipant)
-
-
sendEvent(Action, Sharable)
-
-
sendEvent(AWTEvent)
-
-
sendEvent(AWTEvent, Object)
-
-
sendEvent(ComponentAction)
-
-
sendEvent(Event, Sharable)
-
-
sendKeyedEvent(AWTEvent, Key)
-
-
sendKeyedEvent(AWTEvent, Object, Key)
-
-
sendKeyedEvent(ComponentAction, Key)
-
-
setClipboard(ImagePrimitiveP)
-
-
setCollaborativeEnvironment(Object)
-
-
setDebug(boolean)
-
-
setLatestNeighborhood(String)
-
-
setLockFile(String)
-
-
setLockOwner(boolean)
-
-
setReplay(ReplayController)
-
-
setSingleConnection()
-
-
stop()
-
-
useMultipleConnections()
-
Habanero
public Habanero()
setLockFile
public static void setLockFile(String filename)
getLockFile
public static String getLockFile()
setLockOwner
public static void setLockOwner(boolean b)
getLockOwner
public static boolean getLockOwner()
isLocalEvent
public static boolean isLocalEvent()
getCurrentArg
public static Object getCurrentArg()
getSource
public static Object getSource()
run
public static void run()
- Listen until someone makes a connection. Read the request, call a
a routine to execute it. Close the connection.
stop
public static void stop()
useMultipleConnections
public static boolean useMultipleConnections()
setSingleConnection
public static void setSingleConnection()
findHabaneroFrame
public static HabaneroFrame findHabaneroFrame(Component c)
findMirrorableAncestor
public static Mirrorable findMirrorableAncestor(Component c)
findSharable
public static Sharable findSharable(Object src)
addSharedEventType
public static void addSharedEventType(Class eventType,
Mirrorable m)
addSharedEventType
public static void addSharedEventType(Class eventType,
int id,
Mirrorable m)
addShippingDecision
public static void addShippingDecision(ShippingDecisionFunction fn,
Mirrorable m)
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
owner
public static SessionParticipant owner()
- Returns the owner of this object.
id
public static String id()
- Returns the id of this object, which is the hostname + listening port.
invited
public static void invited(MarshallInput in,
MarshallOutput out)
returnInvitation
public static void returnInvitation(SessionInfo info,
String neighborhood)
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.
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.
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.
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.
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.
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.
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.
good
public static boolean good()
doWait
public static void doWait()
odoNotify
public static void odoNotify()
setLatestNeighborhood
public static void setLatestNeighborhood(String hood)
getLatestNeighborhood
public static String getLatestNeighborhood()
setClipboard
public static void setClipboard(ImagePrimitiveP clipboard)
getClipboard
public static ImagePrimitiveP getClipboard()
sendBeep
public static void sendBeep(SessionParticipant p)
sendEvent
public static boolean sendEvent(ComponentAction event)
sendEvent
public static boolean sendEvent(AWTEvent event)
sendEvent
public static boolean sendEvent(AWTEvent event,
Object arg)
sendKeyedEvent
public static boolean sendKeyedEvent(AWTEvent event,
Key key)
sendKeyedEvent
public static boolean sendKeyedEvent(ComponentAction event,
Key key)
sendKeyedEvent
public static boolean sendKeyedEvent(AWTEvent event,
Object arg,
Key key)
sendEvent
public static boolean sendEvent(Event event,
Sharable s)
sendEvent
public static boolean sendEvent(Action event,
Sharable s)
getReplayController
public static ReplayController getReplayController()
- Returns:
- returns the replay object for the user
setReplay
public static void setReplay(ReplayController newReplayController)
- Parameters:
- newReplayController - the new replay controller
- Returns:
- sets the replay controller
FindSpecified
public static Specifiable FindSpecified(Specifier inSpecifier)
FindSpecified
public static Specifiable FindSpecified(ObjectInput in)
FindSpecifiedObject
public static ModelObject FindSpecifiedObject(ObjectInput in)
FindSpecifiedObject
public static ModelObject FindSpecifiedObject(Specifier inSpecifier)
setDebug
public static void setDebug(boolean d)
getDebug
public static boolean getDebug()
println
public static void println(Object s)
println
public static void println(int s)
println
public static void println(long s)
println
public static void println(boolean s)
println
public static void println(char s)
print
public static void print(Object s)
print
public static void print(long s)
print
public static void print(int s)
print
public static void print(boolean s)
print
public static void print(char s)
setCollaborativeEnvironment
public static void setCollaborativeEnvironment(Object e)
getCollaborativeEnvironment
public static Object getCollaborativeEnvironment()
isInterface
public static boolean isInterface(Object object,
String className)
isEnvironmentInterface
public static boolean isEnvironmentInterface(String className)
getEnvAsWarningAware
public static WarningAware getEnvAsWarningAware()
getEnvAsSessionsAware
public static SessionsAware getEnvAsSessionsAware()
getEnvAsParticipantsAware
public static ParticipantsAware getEnvAsParticipantsAware()
getEnvAsToolsAware
public static ToolsAware getEnvAsToolsAware()
getEnvAsEnvironmentAware
public static EnvironmentAware getEnvAsEnvironmentAware()
makeManager
public static void makeManager(Vector listeningPort) throws Exception
makeManager
public static void makeManager(Vector listeningPort,
boolean url,
String location) throws Exception
makeParticipant
public static SessionParticipant makeParticipant(String host,
int port)
All Packages Class Hierarchy This Package Previous Next Index