com.zion.jbuddy
Class IClientFactory

java.lang.Object
  extended by com.zion.jbuddy.IClientFactory

public final class IClientFactory
extends Object

Creates new IClient instances.

This class contains a single factory method. It cannot be instantiated.


Method Summary
static boolean checkLicense()
          Performs a license check.
static IClient factory(IGateway gateway, int protocol, String username, String password)
          Creates an IClient instance using the specified arguments.
static com.zion.messaging.MsgClient jscFactory(IGateway gw, com.zion.messaging.AccountBean accountBean)
           
static void showLicenseInfo()
          Displays the current license information.
static boolean useLicense(int protocol, String orgName, String licenseKey)
          Use the licenseKey for the specified protocol for this session only (not persisted).
static boolean writeLicense(int protocol, String orgName, String licenseKey)
          Writes the licenseKey for the specified protocol and organization to disk.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkLicense

public static boolean checkLicense()
Performs a license check. Allows an application to check the license at will.

Returns:
true if the license is valid

showLicenseInfo

public static void showLicenseInfo()
Displays the current license information. If the UI is enabled, displays the information in a GUI dialog window. If it is not, prints the information to standard output (STOUT).


useLicense

public static boolean useLicense(int protocol,
                                 String orgName,
                                 String licenseKey)
Use the licenseKey for the specified protocol for this session only (not persisted).

Parameters:
protocol - the IM protocol for which this license applies, if applicable.
orgName - the name of the company, organization or entity which holds this licenseKey
licenseKey - the license string to apply.
Returns:
true if the license is valid
Since:
2.4

writeLicense

public static boolean writeLicense(int protocol,
                                   String orgName,
                                   String licenseKey)
Writes the licenseKey for the specified protocol and organization to disk. If successful, subsequent sessions do not need to invoke useLicense nor writeLicense.

Parameters:
protocol - the IM protocol for which this license applies, if applicable.
orgName - the name of the company, organization or entity which holds this licenseKey
licenseKey - the license string to apply.
Returns:
true if the license is valid and written successfully.
Since:
2.4

factory

public static IClient factory(IGateway gateway,
                              int protocol,
                              String username,
                              String password)
Creates an IClient instance using the specified arguments.

Parameters:
gateway - the specified gateway to receive incoming messages and events from the client via callback methods
protocol - the protocol type, indicating which IM service the client will communicate with
username - the client's login name
password - the client's password
Returns:
the client, or null if the request could not be met

jscFactory

public static com.zion.messaging.MsgClient jscFactory(IGateway gw,
                                                      com.zion.messaging.AccountBean accountBean)


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2012 Zion Software, LLC All Rights Reserved.