NCSAHabanero

[ Previous ] [ Index ] [ Next ]

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

Collobject.originator()

Background Information

When you need to know the person who either started a Hablet, 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 Collobject instance. The Collobject has a method called originator 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 hablet's owner. The following example will show you how to do this.

Example
public String getHabletOwner(MirrorFrame mf)
{
	Collobject c = mf.getCollobject();
	String stringRepresentation = c.origintor().unique();
	return stringRepresentation;
}

What next?

Learn How to let the initiator of a tool do something special before the collaboration starts.


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