NCSAHabanero

[ Previous ] [ Index ] [ Next ]

-------------------------------------------------------------------
How to find out who owns the session
-------------------------------------------------------------------

SessionManager.getManager().owner().unique()

Background Information

When you need to know the person who either started or owns the Habanero session you are participating Habanero can provide you with that person's address and port.

How does this work?

In order you perform this action you need to first get the session's Session Manager instance. The SessionManager has a method called owner which will return a SessionParticpant instance that is the current session's owner. Calling the method unique on this instance will return a String representation of the current owner. The following example will show you how to do this.

Example
public String getSessionOwner()
{
	SessionManager sm = SessionManager.getManager();
	SessionParticipant sp = sm.owner();
	String stringRepresentation = sp.unique();
	return stringRepresentation;
}

What next?

Learn how to find out who started the Hablet.


Habanero® is a registered trademark owned by The Board of Trustees of the University of Illinois. Copyright 1996-1998. All rights reserved.   Java(TM) is a proprietary trademark owned by Sun Microsystems, Inc.

NCSA
The National Center for Supercomputing Applications

University of Illinois at Urbana-Champaign

Contacts page