com.pega.pegarules.pub.runtime
Class NodeNameGenerator

java.lang.Object
  extended by com.pega.pegarules.pub.runtime.NodeNameGenerator

public class NodeNameGenerator
extends java.lang.Object

NodeNameGenerator This is used to provide a default node name generator, called during startup and used to generate suitable node names for this application. Use this class as a model for your implementation. The run method below is the default, the execute is only present for testing purposes. Use the system property "com.pega.pegarules.nodename.classname" to specify the classname and method to call your own class. the format for this is package.ClassName.method or package.ClassName - which assumes a method named "run". (Note: We key off of the case of the methodName, so the case of the ClassName and methodName are important!) In any case the method MUST have the signature of the run method below.

Version:
$Revision: 10898 $ $Date: 2011-05-19 16:02:45 -0400 (Thu, 19 May 2011) $
Author:
Bill Clinton

Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
NodeNameGenerator()
           
 
Method Summary
static java.lang.String execute(java.lang.String defaultName, java.lang.String hashedName)
          Sample method, used only for testing.
static java.lang.String run(java.lang.String defaultName, java.lang.String hashedName)
          "run" method is the model for the node name generating method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Constructor Detail

NodeNameGenerator

public NodeNameGenerator()
Method Detail

execute

public static java.lang.String execute(java.lang.String defaultName,
                                       java.lang.String hashedName)
Sample method, used only for testing. See run(String, String) for complete information

Parameters:
defaultName -
hashedName -
Returns:
new node name

run

public static java.lang.String run(java.lang.String defaultName,
                                   java.lang.String hashedName)
"run" method is the model for the node name generating method. The name is unimportant (since it can be specified as and invoked via reflection) the return types and parameters are what really matter.

Parameters:
defaultName - receives "machinename/systemname" from the initializing system. ex: "SDEVRULESB/pega"
hashedName - receives the hash used for the node name.
Returns:
The name you wish to assign to this node - can be anything BUT MUST BE UNIQUE. This value is written to the Data-Admin-Nodes instance for the initializing node in the pyLabel field.


Copyright © 2012 Pegasystems Inc. All Rights Reserved.