com.tivoli.twg.engine
Class TWGServerServiceNode

java.lang.Object
  |
  +--com.tivoli.twg.libs.ServiceNode
        |
        +--com.tivoli.twg.engine.TWGServerServiceNode
All Implemented Interfaces:
java.lang.Runnable

public class TWGServerServiceNode
extends ServiceNode

Primary ServiceNode for Director Server. This ServiceNode class provides a commonly accessable ServiceNode for communicating from within the server (including from within server extensions), as well as allowing custom command handlers to be registered. Specifically, support for TWGServerCommand-based classes can be registered, which are Command classes which use a common command code, but specify different "subcommands" through a command identifier string (ASCIIZ) in the first parameter.


Fields inherited from class com.tivoli.twg.libs.ServiceNode
SVCNODE_DISABLE_TRACING_CMD, SVCNODE_ENABLE_TRACING_CMD, SVCNODE_GET_STATUS_CMD, SVCNODE_KILL_SERVICE_CMD
 
Method Summary
 boolean CommandReceived(Command cmd)
          Default handler for commands sent to server ServiceNode.
static TWGServerServiceNode GetServiceNode()
          Return server service node
static void handleActDeactUserAccountInfo(Command cmd)
          Handle request to activate/deactivate native user account
static void handleCreateNonNative(Command cmd)
          Handle request to create non-native account
static void handleDeleteFilters(Command cmd)
          Handle request to delete filters
static void handleDeleteManagedObjects(Command cmd)
          Handle request to delete managed objects
static void handleDeleteNonNative(Command cmd)
          Handle request to delete non-native account
static void handleDeleteUser(Command cmd)
          Handle request to delete user account
static void handleDiscoveryAllRequest(Command cmd)
          Handle request to start discovery on all MOFs
static void handleGetAddressEntries(Command cmd)
          Handle request to get address entries for given managed objects
static void handleGetAttributeCmd(Command cmd)
          Handle request for attribute reads
static void handleGetAttributeIDsCmd(Command cmd)
          Get list of supported attribute IDs command request
static void handleGetUserAccountInfo(Command cmd)
          Handle request for user account information
static void handleInitUser(Command cmd)
          Handle request to initialize user account
static void handleInventoryUpdateNotification(Command cmd)
          Handle notification command for inventory update
static void handleListTWGObjectsCmd(Command cmd)
          Handle request to get list of all object IDs of all instances of a given TWGObject subclass
static void handleListTWGPersistentObjectsCmd(Command cmd)
          Handle request to get list of all object IDs of all instances of a given TWGPersistentObject subclass
static void handleResolveFilterMembers(Command cmd)
          Handle request for filter members
static void handleSetAttributeCmd(Command cmd)
          Handler for attribute write request
static void Initialize()
          Initialization method : creates service node
static void RegisterServerCommandHandler(java.lang.String cmdname, TWGServerCommandHandler handler)
          Register an extension command handler with the server ServiceNode.
static void Terminate()
          Termination method : closes service node
static void UnregisterServerCommandHandler(java.lang.String cmdname)
          Unregister an extension command handler
 
Methods inherited from class com.tivoli.twg.libs.ServiceNode
Close, ConnectionActive, Create, DeregisterCommandListener, DeregisterDefaultCommandListener, EnqueueCommandFail, EnqueueReceiveBuffer, formatCommandCode, formatReturnCode, GetFeatureFlags, GetServiceNodeFactory, getTS, IsActive, IsRawMode, LocalMACAddress, LocalMacAddressList, LocalSystemName, LocalUniqueID, Name, PeriodicCallback, ProcessCommands, ReceiveData, RegisterAsServiceBase, RegisterCommandListener, RegisterDefaultCommandListener, run, SendAsynchCommand, SendBuffer, SendCommand, SendLocalAsyncCommand, SendLocalCommand, SendPostponedReply, SetActive, setCommandDebugString, SetFeatureFlags, SetGlobalNetworkTimeout, SetLocalSystemName, SetPeriodicCallback, SetServiceNodeFactory, ThreadInit, ThreadTerm, toString, traceCommandCompleteCall, traceCommandReceived, traceCommandReceivedReturn, traceCommandSend, traceError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

Initialize

public static void Initialize()
                       throws BadServiceNodeImplException,
                              ServiceNodeClosedException,
                              ServiceNodeException
Initialization method : creates service node
Throws:
BadServiceNodeImplException - - if no ServiceNodeImplFactory defined
ServiceNodeClosedException - - if ServiceNode failed to open
ServiceNodeException - if other problem occurs

Terminate

public static void Terminate()
                      throws ServiceNodeException
Termination method : closes service node
Throws:
ServiceNodeException - if other problem occurs

GetServiceNode

public static TWGServerServiceNode GetServiceNode()
Return server service node
Returns:
instance of TWGServerServiceNode

RegisterServerCommandHandler

public static void RegisterServerCommandHandler(java.lang.String cmdname,
                                                TWGServerCommandHandler handler)
Register an extension command handler with the server ServiceNode. Extension command names should follow a format similar to a Java package+class, to assure uniqueness. For example, if the handler class is "com.tivoli.twg.SNMPHandler", commands might be named "com.tivoli.twg.SNMPHandler.", where is used to differentiate between different commands supported by the same handler.
Parameters:
cmdname - - name string for command
handler - - handler to be registered

UnregisterServerCommandHandler

public static void UnregisterServerCommandHandler(java.lang.String cmdname)
Unregister an extension command handler
Parameters:
cmdname - - name string for command

CommandReceived

public boolean CommandReceived(Command cmd)
Default handler for commands sent to server ServiceNode. This code is primarily used for the TWGServerCommand processing: other commands are handled by registered listeners.
Overrides:
CommandReceived in class ServiceNode
Parameters:
cmd - - Command instance received
Returns:
true if command processing should continue, false to terminate the ServiceNode

handleGetAttributeCmd

public static void handleGetAttributeCmd(Command cmd)
Handle request for attribute reads
Parameters:
cmd - - Command containing request

handleSetAttributeCmd

public static void handleSetAttributeCmd(Command cmd)
Handler for attribute write request
Parameters:
cmd - - request command

handleGetAttributeIDsCmd

public static void handleGetAttributeIDsCmd(Command cmd)
Get list of supported attribute IDs command request
Parameters:
cmd - - command request

handleListTWGObjectsCmd

public static void handleListTWGObjectsCmd(Command cmd)
Handle request to get list of all object IDs of all instances of a given TWGObject subclass
Parameters:
cmd - - command request

handleListTWGPersistentObjectsCmd

public static void handleListTWGPersistentObjectsCmd(Command cmd)
Handle request to get list of all object IDs of all instances of a given TWGPersistentObject subclass
Parameters:
cmd - - command request

handleDeleteManagedObjects

public static void handleDeleteManagedObjects(Command cmd)
Handle request to delete managed objects
Parameters:
cmd - - command requested

handleGetAddressEntries

public static void handleGetAddressEntries(Command cmd)
Handle request to get address entries for given managed objects
Parameters:
cmd - - command requested

handleDeleteFilters

public static void handleDeleteFilters(Command cmd)
Handle request to delete filters
Parameters:
cmd - - command requested

handleDiscoveryAllRequest

public static void handleDiscoveryAllRequest(Command cmd)
Handle request to start discovery on all MOFs
Parameters:
cmd - - received command

handleInventoryUpdateNotification

public static void handleInventoryUpdateNotification(Command cmd)
Handle notification command for inventory update
Parameters:
cmd - - received command

handleResolveFilterMembers

public static void handleResolveFilterMembers(Command cmd)
Handle request for filter members
Parameters:
cmd - - received command

handleGetUserAccountInfo

public static void handleGetUserAccountInfo(Command cmd)
Handle request for user account information
Parameters:
cmd - - command requested

handleActDeactUserAccountInfo

public static void handleActDeactUserAccountInfo(Command cmd)
Handle request to activate/deactivate native user account
Parameters:
cmd - - command requested

handleCreateNonNative

public static void handleCreateNonNative(Command cmd)
Handle request to create non-native account
Parameters:
cmd - - command requested

handleDeleteNonNative

public static void handleDeleteNonNative(Command cmd)
Handle request to delete non-native account
Parameters:
cmd - - command requested

handleDeleteUser

public static void handleDeleteUser(Command cmd)
Handle request to delete user account
Parameters:
cmd - - command requested

handleInitUser

public static void handleInitUser(Command cmd)
Handle request to initialize user account
Parameters:
cmd - - command requested