org.netbeans.lib.collab
Class CollaborationSessionFactory

java.lang.Object
  extended byorg.netbeans.lib.collab.CollaborationSessionFactory

public class CollaborationSessionFactory
extends java.lang.Object

This class is a Factory class, which can be used to create CollborationSessions. It uses an implementation of CollaborationSessionProvider to create Collaborationsessions. The no argument constructor uses the java system property to identify the class name of the CollaborationSessionProvider implementation. Alternatively the other constructor takes the name of the class implementing the CollaborationSessionProvider interface. For a list of supported CollaborationSessionProvier implementations refer to your API provider's documentation. For a descripton of serviceURL refer to your API provider's documentation. Starting point used to create sessions.

Since:
version 0.1
See Also:
Default API provider's documentation

Field Summary
static int MAJOR_VERSION
          major version number
static int MINOR_VERSION
          minor version number
static java.lang.String systemProperty
          System property containing the name of the CollaborationSessionFactory to use.
 
Constructor Summary
CollaborationSessionFactory()
           
CollaborationSessionFactory(java.lang.String className)
           
 
Method Summary
 void close()
           
 CollaborationSessionProvider getCollaborationSessionProvider()
          return the CollaborationSessionProvider instance in use by this factory
 CollaborationSession getSession(java.lang.String serviceUrl, java.lang.String loginName, java.lang.String password, CollaborationSessionListener listener)
          creates a collaboration session.
 CollaborationSession getSession(java.lang.String serviceUrl, java.lang.String destination, java.lang.String loginName, java.lang.String password, CollaborationSessionListener listener)
          creates a collaboration session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAJOR_VERSION

public static final int MAJOR_VERSION
major version number

See Also:
Constant Field Values

MINOR_VERSION

public static final int MINOR_VERSION
minor version number

See Also:
Constant Field Values

systemProperty

public static final java.lang.String systemProperty
System property containing the name of the CollaborationSessionFactory to use. This system property must be set in order to use a non-default implementation of CollaborationSessionFactory

See Also:
Constant Field Values
Constructor Detail

CollaborationSessionFactory

public CollaborationSessionFactory()
                            throws java.lang.Exception

CollaborationSessionFactory

public CollaborationSessionFactory(java.lang.String className)
                            throws java.lang.Exception
Method Detail

getSession

public CollaborationSession getSession(java.lang.String serviceUrl,
                                       java.lang.String loginName,
                                       java.lang.String password,
                                       CollaborationSessionListener listener)
                                throws CollaborationException
creates a collaboration session.

Parameters:
serviceUrl - URL for the authentication service (hostname and port).
loginName - login name
password - user password
listener - session listener to convey asynchronous errors and events.
Returns:
an authenticated collaboration services session.
Throws:
CollaborationException

getSession

public CollaborationSession getSession(java.lang.String serviceUrl,
                                       java.lang.String destination,
                                       java.lang.String loginName,
                                       java.lang.String password,
                                       CollaborationSessionListener listener)
                                throws CollaborationException
creates a collaboration session.

Parameters:
serviceUrl - service access point. May include hostname domain name, port number, or other parameter to be interpreted by API implementations to establish a connection with the service.
destination - address to be used by others to identify the created session. In the case of XMPP, this is the full JID (resource included) used by this session.
loginName - login name
password - user password
listener - session listener to convey asynchronous errors and events.
Returns:
an authenticated collaboration services session.
Throws:
CollaborationException

getCollaborationSessionProvider

public CollaborationSessionProvider getCollaborationSessionProvider()
return the CollaborationSessionProvider instance in use by this factory

Returns:
CollaborationSessionProvider instance

close

public void close()