com.tivoli.twg.libs
Class ServiceNodeImplFactory

java.lang.Object
  extended bycom.tivoli.twg.libs.ServiceNodeImplFactory

public abstract class ServiceNodeImplFactory
extends java.lang.Object

ServiceNodeImplFactory is the base class for defining Bossman transport interface factories. This abstract base class defined the methods for creating instances of ServiceNodeImpl subclasses, as well as handling various static methods of ServiceNode.


Constructor Summary
ServiceNodeImplFactory()
           
 
Method Summary
abstract  boolean ConnectionActive(java.lang.String name)
          Test to see if a ServiceNode with the given name is currently active.
abstract  ServiceNodeImpl CreateServiceNode(java.lang.String name)
          Create instance of ServiceNodeImpl subclass appropriate for this factory.
abstract  int GetFeatureFlags()
          Get global feature flags for local (or server) system.
abstract  int GetGlobalTimeout(java.lang.String dest, int timeout)
          Get global default timeout for Commands.
abstract  byte[] LocalMACAddress()
          Return local (or server, if proxy) MAC address, as byte[6] (abstract)
abstract  byte[][] LocalMacAddressList()
           
abstract  java.lang.String LocalSystemName()
          Return local system's name (or server name, for proxy).
abstract  byte[] LocalUniqueID()
          Return local (or server, if proxy) unique ID, as byte[8].
abstract  void RegisterAsServiceBase()
          Register this process as a "service base" process, which should not be terminated if the user logs off the system (i.e.
abstract  void SetFeatureFlags(int flags)
          Set global feature flags for local (or server) system.
abstract  void SetGlobalTimeout(int timeout)
          Set global default timeout for Commands.
abstract  void SetLocalSystemName(java.lang.String name)
          Set local system's name (or server name, for proxy).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceNodeImplFactory

public ServiceNodeImplFactory()
Method Detail

CreateServiceNode

public abstract ServiceNodeImpl CreateServiceNode(java.lang.String name)
                                           throws ServiceNodeClosedException,
                                                  ServiceNodeException
Create instance of ServiceNodeImpl subclass appropriate for this factory. (abstract)

Parameters:
name - - name string
Returns:
new instance of ServiceNodeImpl subclass
Throws:
ServiceNodeClosedException - - if ServiceNodeImpl failed to open
ServiceNodeException - if other problem occurs

ConnectionActive

public abstract boolean ConnectionActive(java.lang.String name)
                                  throws ServiceNodeException
Test to see if a ServiceNode with the given name is currently active. (abstract)

Parameters:
name - - Name of ServiceNode to check
Returns:
true if ServiceNode exists, or false if it does not exist
Throws:
ServiceNodeException - if other problem occurs

SetGlobalTimeout

public abstract void SetGlobalTimeout(int timeout)
                               throws ServiceNodeException
Set global default timeout for Commands. (abstract)

Parameters:
timeout - - default time-out, in milliseconds
Throws:
ServiceNodeException - for other problems

GetGlobalTimeout

public abstract int GetGlobalTimeout(java.lang.String dest,
                                     int timeout)
                              throws ServiceNodeException
Get global default timeout for Commands. (abstract)

Parameters:
dest - - destination address of Command
timeout - - timeout of Command, in milliseconds
Returns:
actual timeout, in milliseconds
Throws:
ServiceNodeException - for other problems

LocalSystemName

public abstract java.lang.String LocalSystemName()
                                          throws ServiceNodeException
Return local system's name (or server name, for proxy). (abstract)

Returns:
string for system's name
Throws:
ServiceNodeException - for other problems

SetLocalSystemName

public abstract void SetLocalSystemName(java.lang.String name)
                                 throws ServiceNodeFunctionUnsupportedException,
                                        ServiceNodeException
Set local system's name (or server name, for proxy).

Parameters:
name - - string for system's name
Throws:
ServiceNodeFunctionUnsupportedException - if not implemented
BadServiceNodeImplException - if no ServiceNodeImplFactory
ServiceNodeException - for other problems

LocalMACAddress

public abstract byte[] LocalMACAddress()
                                throws ServiceNodeException
Return local (or server, if proxy) MAC address, as byte[6] (abstract)

Returns:
MAC address, as byte[6]. If not available, all bytes will be zero.
Throws:
ServiceNodeException - for other problems

LocalMacAddressList

public abstract byte[][] LocalMacAddressList()
                                      throws ServiceNodeException
Throws:
ServiceNodeException

LocalUniqueID

public abstract byte[] LocalUniqueID()
                              throws ServiceNodeException
Return local (or server, if proxy) unique ID, as byte[8]. If not available, null will be returned. (abstract)

Returns:
byte[8] containing unique ID
Throws:
ServiceNodeException - for other problems

RegisterAsServiceBase

public abstract void RegisterAsServiceBase()
                                    throws ServiceNodeFunctionUnsupportedException,
                                           ServiceNodeException
Register this process as a "service base" process, which should not be terminated if the user logs off the system (i.e. Win95) Should be called for any "base" process. (abstract)

Throws:
ServiceNodeFunctionUnsupportedException - if not implemented
ServiceNodeException - for other problems

GetFeatureFlags

public abstract int GetFeatureFlags()
                             throws ServiceNodeException
Get global feature flags for local (or server) system. (abstract)

Returns:
feature flags, as int
Throws:
BadServiceNodeImplException - if no ServiceNodeImplFactory
ServiceNodeException - for other problems

SetFeatureFlags

public abstract void SetFeatureFlags(int flags)
                              throws ServiceNodeFunctionUnsupportedException,
                                     ServiceNodeException
Set global feature flags for local (or server) system. (abstract)

Parameters:
flags - - feature flags, as int
Throws:
ServiceNodeFunctionUnsupportedException - if not implemented
ServiceNodeException - for other problems