Class PortalContext

java.lang.Object
com.portal.pcm.PortalContext

public class PortalContext extends Object
Objects of type PortalContext create and manage connections to Portal.

A connection is made by opening an Portal context, which is a communication channel between a client application and the Portal server. All data in the Portal server is accessed by using an open context. You can open a context through the class constructor by passing it login information, or by using one of the open or connect methods. It's best to create a default instance of PortalContext and use one of these methods to open the context:

  • connect()
  • connect(Properties uprops)
  • open(Flist flist)
Which method you use to open a context depends on where you will retrieve login information. Configuration settings that contain the login information for the context can be retrieved from three different sources:
  • An Infranet.properties file in the application classpath.
  • A java.util.Properties object passed in.
  • An FList passed in.
For more information about opening a context using Java PCM, see Creating Client Applications by Using Java PCM in the Portal online documentation.

  • Field Details

    • OPFLG_NO_DESCEND

      public static final int OPFLG_NO_DESCEND
      Opcode control flag. Used with the PCM_OP_READ_OBJECT opcode. Only reads substructs or arrays that are explicitly given on the input filst. Use this flag when reading fields and objects.
      See Also:
    • OPFLG_META_ONLY

      public static final int OPFLG_META_ONLY
      Opcode control flag. Returns only "meta" data from buffer fields when fields or objects are read.
      See Also:
    • OPFLG_REV_CHECK

      public static final int OPFLG_REV_CHECK
      Opcode control flag. Checks the revision level of the object. If the revision is current, no data is returned when fields or objects are read.
      See Also:
    • OPFLG_COUNT_ONLY

      public static final int OPFLG_COUNT_ONLY
      Opcode control flag. Returns only the number of matching entries when a search is performed.
      See Also:
    • OPFLG_ADD_ENTRY

      public static final int OPFLG_ADD_ENTRY
      Opcode control flag. Adds an array element if it doesn't already exist. This flag is required if you are writing or incrementing array elements.
      See Also:
    • OPFLG_USE_POID_GIVEN

      public static final int OPFLG_USE_POID_GIVEN
      Opcode control flag. Uses the POID ID that you specify. Use this flag when creating or reading objects that have audit trails.
      See Also:
    • OPFLG_CALC_ONLY

      public static final int OPFLG_CALC_ONLY
      Opcode control flag. Returns the results of an operation without changing the values stored in the database.
      See Also:
    • OPFLG_READ_RESULT

      public static final int OPFLG_READ_RESULT
      Opcode control flag. Returns the whole object instead of just the POID.
      See Also:
    • OPFLG_NO_RESULTS

      public static final int OPFLG_NO_RESULTS
      Opcode control flag. Performs operations without returning results. Use this flag when writing or incrementing fields and higher performance is needed.
      See Also:
    • OPFLG_CHACHABLE

      public static final int OPFLG_CHACHABLE
      Opcode control flag. Caches results in the Portal Connection Manager (CM). Use only when reading fields.
      See Also:
    • OPFLG_READ_UNCOMMITTED

      public static final int OPFLG_READ_UNCOMMITTED
      Opcode control flag. Prevents blocking while reading from a table when a concurrent transaction updates the same record. Specially created for use with SQL servers.
      See Also:
    • OPFLG_READ_READPAST

      public static final int OPFLG_READ_READPAST
      See Also:
    • OPFLG_SEARCH_DB

      public static final int OPFLG_SEARCH_DB
      Opcode control flag.Used by CM to skip schema search and by DMTT to search Oracle DB. The use case is ACT_FIND for account lookup via search over /service
      See Also:
    • OPFLG_SEARCH_PARTITIONS

      public static final int OPFLG_SEARCH_PARTITIONS
      Opcode control flag.Used by DM to search including all logical partitions.
      See Also:
    • OPFLG_SEARCH_ONE_PARTITION

      public static final int OPFLG_SEARCH_ONE_PARTITION
      Opcode control flag.Used by DM to enforce local search
      See Also:
    • TRAN_OPEN_READONLY

      public static final int TRAN_OPEN_READONLY
      Flag used with the PCM_OP_TRANS_OPEN opcode to open a read-only transaction. Use this flag when the operation will not change any data in the transaction. Any number of read-only transactions can be opened against a database at once.
      See Also:
    • TRAN_OPEN_READWRITE

      public static final int TRAN_OPEN_READWRITE
      Flag used with the PCM_OP_TRANS_OPEN opcode to open a read-write transaction. Use this flag when you write to the database. Changes made to the data set are not final until the transaction is committed. Any number of read-write transactions can be opened against a database at once.
      See Also:
    • TRAN_OPEN_LOCK_OBJ

      public static final int TRAN_OPEN_LOCK_OBJ
      Flag used with the PCM_OP_TRANS_OPEN opcode to open a lock-object transaction. This flag locks a storable object as part of the transaction. No changes can be made to the object by other transactions until the current transaction is closed. If this flag is specified, the TRANS_OPEN_READWRITE flag must also be specified.
      See Also:
    • TRAN_OPEN_GLOBALTRANSACTION

      public static final int TRAN_OPEN_GLOBALTRANSACTION
      Flag used with the PCM_OP_TRANS_OPEN opcode to open a multi-schema global transaction. This flag is used to indicate that the transaction is executed in a multi-schema environment and must be considered as a global transaction. TRANS_OPEN_READWRITE flag must also be specified.
      See Also:
    • Hostname

      public static String Hostname
    • ProgramName

      public static String ProgramName
  • Constructor Details

    • PortalContext

      public PortalContext(com.portal.pcm.PCPContext ctx)
    • PortalContext

      public PortalContext() throws EBufException
      Creates a default instance of PortalContext. This does not open a connection to the server. You must open a connection using one of the open or connect methods before any transactions can be performed.
      Throws:
      EBufException - thrown if an error occurs.
    • PortalContext

      public PortalContext(boolean sockKeepAlive) throws EBufException
      Creates a default instance of PortalContext. This does not open a connection to the server. You must open a connection using one of the open or connect methods before any transactions can be performed.
      Parameters:
      sockKeepAlive - A boolean value to enable socket level parameters.
      Throws:
      EBufException - thrown if an error occurs.
    • PortalContext

      public PortalContext(Boolean pcpDebug, boolean sockKeepAlive) throws EBufException
      Creates a default instance of PortalContext. This does not open a connection to the server. You must open a connection using one of the open or connect methods before any transactions can be performed.
      Parameters:
      pcpDebug - - allows to pass a flag to turn on PCP debug
      sockKeepAlive - - allows to pass a flag to turn on socket keepalive
      Throws:
      EBufException - thrown if an error occurs.
    • PortalContext

      public PortalContext(FList login) throws EBufException
      Creates an instance of PortalContext, and opens a connection. Configuration settings for the context are defined in the flist passed in. The flist must be in the form:
       0 PIN_FLD_POID            POID [0] 0.0.0.1 /service/pcm_client 0 0
       0 PIN_FLD_TYPE            ENUM [0] 1
       0 PIN_FLD_LOGIN           STR  [0] "root.0.0.0.1"
       0 PIN_FLD_PASSWD_CLEAR    STR  [0] "password"
       0 PIN_FLD_TIMEOUT_IN_MS   INT  [0] 30000
       0 PIN_FLD_CM_PTRS          ARRAY [0] allocated 1, used 1
       1      PIN_FLD_CM_PTR           STR [0] "ip <<I>server_hostname</I>> 11960"
       

      For an example of opening a context using an flist passed in, see Sample Programs in the Portal online documentation.

      Parameters:
      login - A login FList containing configuration settings for the context.
      Throws:
      EBufException - thrown if an error occurs.
    • PortalContext

      public PortalContext(Properties uprops) throws EBufException
      Creates an instance of PortalContext, and opens a connection. Configuration settings for the context are defined in the Properties object passed in. The Properties object requires two key/value entries:
       infranet.connection=CONNECTION_STRING
      infranet.login.type=1
       
      The connection requires login, password, host, port, service and login type. The format for the CONNECTION_STRING is: pcp://<login>:<password>@<hostname>:<port>/service/admin_client 1
      Parameters:
      uprops - A Properties object containing configuration settings for the context.
      Throws:
      EBufException - thrown if an error occurs.
    • PortalContext

      public PortalContext(FList login, Properties props, Boolean pcpDebug) throws EBufException
      This constructor is added to pass PCP debug parameter outside properties file Applications which are not passing properties file can set debug_pcp flag to turn on the PCP level debugging
      Parameters:
      login - FList with login info
      props - Properties object. This parameter is ignored in this override at the moment
      pcpDebug - Boolean value indicating to enable (true) or disable (false) PCP debug logs
      Throws:
      EBufException - when an error occurs
    • PortalContext

      public PortalContext(FList login, Properties uprops) throws EBufException
      Creates an instance of PortalContext, and opens a connection. Configuration settings for the context are taken from the flist passed in. The flist must be in the form:
       0 PIN_FLD_POID           POID [0] 0.0.0.1 /service/pcm_client 0 0
       0 PIN_FLD_TYPE           ENUM [0] 1
       0 PIN_FLD_LOGIN          STR  [0] "root.0.0.0.1"
       0 PIN_FLD_PASSWD_CLEAR   STR  [0] "password"
       0 PIN_FLD_TIMEOUT_IN_MS   INT  [0] 30000
       0 PIN_FLD_CM_PTRS       ARRAY [0] allocated 1, used 1
       1      PIN_FLD_CM_PTR         STR [0] "ip <<I>server_hostname</I>> 11960"
       

      For an example of opening a context using an flist passed in, see the Sample Programs in the Portal online documentation.

      Parameters:
      login - A login FList containing configuration settings for the context.
      uprops - A Properties object for configuration settings. Its value can be null.

      NOTE: uprops is not implemented in this constructor; it is for future usability.

      Throws:
      EBufException - thrown if an error occurs. Opcode and Flist Logging: To enable opcode and flist logging, you will need to add the following to your Infranet.properties file: infranet.log.opcodes.enabled=true infranet.log.opcodes.file=[opcode logfile] NOTE: [opcode logfile] is the name of your logfile. EXAMPLE: infranet.log.opcodes.file=d:/temp/opcode.log NOTE: you cannot use backslash "\" characters in your directory structure
    • PortalContext

      protected PortalContext(PortalContext srcPortalCtx)
      Allow a subclass to create an instance of PortalContext using connection information from an existing PortalContext object. If the Portal connection for the source PortalContext has already been established (via the open() or connect() calls) the new connection will "adopt" the Portal connection. Otherwise, the created PortalContext will need to be connected explicitly.

      Important: The source PortalContext is reset do its initial state once it's used; it is no longer connected to Portal. Generally, you should refrain from using it, however, if you must, you need to reopen the connection.

      Parameters:
      srcPortalCtx - PortalContext whose Portal connected is adopted by the newly-created PortalContext. The source PortalContext is reset to its default values after being used.
    • PortalContext

      public PortalContext(PCPSelector selector) throws EBufException
      ======================================================================== =================== NIO Constructors ====================================== =====================================================
      Throws:
      EBufException
    • PortalContext

      public PortalContext(PCPSelector selector, FList login, Properties uprops) throws EBufException
      Throws:
      EBufException
  • Method Details

    • addConnectionListner

      public void addConnectionListner(CMConnectionListener abc)
      Adds a Listerner to the existing connection pool of listeners
    • removeConnectionListener

      public void removeConnectionListener(CMConnectionListener abc)
      Deletes a Listerner to the existing connection pool of listeners
    • setTimeout

      public static void setTimeout(int timeout)
      Set global socket time-out, will be used when the infranet.properties does not have timeout entry.
    • setTimeoutOverrideOriginal

      public void setTimeoutOverrideOriginal(int timeout)
      Exposing a method that is required by JCAA to override the timeout value in case of commit and no_transaction mode
      Parameters:
      timeout -
    • cloneConnection

      public PortalContext cloneConnection() throws EBufException
      /** Clones this PortalContext. If the Portal connection for this PortalContext has been established via the open() or connect() calls, the cloned PortalContext will also have opened an Infraent connection.
      Returns:
      the new PortalContext
      Throws:
      EBufException
    • transactionOpen

      public void transactionOpen(int flags) throws EBufException
      Opens a transaction on the current database. This is a convenient method that calls the PCM_OP_TRANS_OPEN opcode and keeps track of the transaction state. Only one transaction can be opened at a time on the context. If you want to execute another transaction, you must open another context.

      The type of transaction is determined by the flags parameter. For more information on transactions and the transaction flags, see the PCM_OP_TRANS_OPEN opcode in the Portal online documentation.

      Parameters:
      flags - Transaction flag that defines the type of transaction to open.
      Throws:
      EBufException - is thrown if an error occurs.
      See Also:
    • transactionOpen

      public void transactionOpen(int flags, long dbNumber) throws EBufException
      Opens a transaction on the database. This is a convenient method that calls the PCM_OP_TRANS_OPEN opcode and keeps track of the transaction state. Only one transaction can be opened at a time on the context. If you want to execute another transaction, you must open another context.

      The type of transaction is determined by the flags parameter. For more information on transactions and the transaction flags, see the PCM_OP_TRANS_OPEN opcode in the Portal online documentation.

      Parameters:
      flags - Transaction flag that defines the type of transaction to open.
      dbNumber - The database number where transaction is being opened
      Throws:
      EBufException - is thrown if an error occurs.
      See Also:
    • transactionCommit

      public void transactionCommit() throws EBufException
      Commits a transaction. This method calls the PCM_OP_TRANS_COMMIT opcode. Committing a transaction causes all data changes to take effect and closes the open transaction. For more information, see PCM_OP_TRANS_COMMIT in the Portal online documentation.
      Throws:
      EBufException - is thrown if an error occurs.
      See Also:
    • transactionAbort

      public void transactionAbort() throws EBufException
      Aborts a transaction. This method calls the PCM_OP_TRANS_ABORT opcode. When a transaction is aborted, all data changes made in the transaction are discarded and the transaction is closed. For more information, see the PCM_OP_TRANS_ABORT opcode in the Portal online documentation.
      Throws:
      EBufException - is thrown if an error occurs.
      See Also:
    • open

      public void open(FList in) throws EBufException
      Opens a connection context with the server. Configuration settings for the context are defined in the flist passed in. The flist must be in the form:
       0 PIN_FLD_POID           POID [0] 0.0.0.1 /service/pcm_client 0 0
       0 PIN_FLD_TYPE           ENUM [0] 1
       0 PIN_FLD_LOGIN          STR  [0] "root.0.0.0.1"
       0 PIN_FLD_PASSWD_CLEAR   STR  [0] "password"
       0 PIN_FLD_TIMEOUT_IN_MS   INT  [0] 30000
       0 PIN_FLD_CM_PTRS       ARRAY [0] allocated 1, used 1
       1      PIN_FLD_CM_PTR         STR [0] "ip <<I>server_hostname</I>> 11960"
       

      For an example of opening a context using an flist passed in, see Sample Programs in the Portal online documentation.

      Parameters:
      in - FList containing configuration settings for the context.
      Throws:
      EBufException - is thrown if an error occurs.
    • close

      public void close(boolean logout) throws EBufException
      Closes a connection context with the server. Always close the context when it is no longer needed. To ensure proper logout, pass true.
      Parameters:
      logout - true to logout from the server.
      Throws:
      EBufException - is thrown if an error occurs.
    • isContextValid

      public boolean isContextValid()
      Checks if the underlying PCP Context is valid or not Called from external programs to check if the PortalContext is useable
      Returns:
      true if underlying pcp context is not null
    • disconnect

      public void disconnect() throws EBufException
      Disconnects from server. Does not reset the context and does not logout Currently used by JCA Adapter to disconnect when rollback is called for for an active transaction in a different thread.
      Throws:
      EBufException - is thrown if an error occurs.
    • serviceSearch

      public FList serviceSearch(int op, int flags, FList in) throws EBufException
      Performs a dual search. Searches TT first. In case there is no result returned, the same search is fired for the Oracle database to fetch the response. This will work as is in the next releases of Timos since when union search would be supported, the first search call itself would fetch all the results.
      Parameters:
      op - An opcode to perform. For a list of opcodes, see the PortalOp class.
      flags - Control flag for the opcode being called. See the individual opcode descriptions for information on the flags they take. NOTE: Most opcodes take no flags, which you enter as 0.
      in - The opcode input FList. For a list of mandatory and optional fields for the input flist, see the relevant opcode description, which provides a link to input flist specifications.
      Returns:
      The opcode output FList. For a list of mandatory and optional fields for the output flist, see the relevant opcode description, which provides a link to output flist specifications.
      Throws:
      EBufException - is thrown if an error occurs.
    • reconnect

      public void reconnect() throws EBufException
      Reconnects a closed PortalContext with the same parameters as it was last opened with. If the PortalContext wasn't closed or if it had never been opened, then this does not do anything.
      Throws:
      EBufException - is thrown if an error occurs.
    • reconnect

      public void reconnect(String pw) throws EBufException
      Reconnects a closed PCPConnection with the same parameters as it was last opened with, but with new password. If it had never been opened, then calling this generates an EBufException.
      Throws:
      EBufException - is thrown if an error occurs.
    • reconnectAfterUpdatePwd

      public void reconnectAfterUpdatePwd(String tempPwd) throws EBufException
      Reconnects a closed PortalContext with the updated FldPasswdClear parameters. If the PortalContext wasn't closed or if it had never been opened, then this does not do anything.
      Throws:
      EBufException - is thrown if an error occurs.
    • connect

      public void connect() throws EBufException
      Opens a connection context with the server. Configuration settings for the context are retrieved from a default Infranet.properties file. You must put a valid Infranet.properties file in your CLASSPATH. For information about setting properties in the Infranet.properties file, see the Setting global options section of Creating Client Applications by Using Java PCM in the Portal online documentation.
      Throws:
      EBufException - is thrown if an error occurs.
    • connect

      public void connect(Properties uprops) throws EBufException
      Opens a connection context with the server. This method first checks the default Infranet.properties file to see if it has been read. If the file has been read, it retrieves configuration settings from that file. If the file has not yet been read, it retrieves settings for the connection from the Properties object passed in. The Properties object requires two key/value entries:
       infranet.connection=CONNECTION_STRING
      infranet.login.type=1
       
      The connection requires login, password, host, port, service and login type. The format for the CONNECTION_STRING is: pcp://<login>:<password>@<hostname>:<port>/service/admin_client 1
      Parameters:
      uprops - A Properties object containing configuration settings for the context.
      Throws:
      EBufException - is thrown if an error occurs.
    • enableOpcodeLogging

      public void enableOpcodeLogging(boolean enable)
      Enables or disables opcode logging. The opcode log keeps track of opcodes called and logs the flists. If enabled, Infranet.properties must have a filename entry to set the destination log. For example: infranet.log.opcodes.file = mylog.log

      For more information, see the Setting global options section of Creating Client Applications by Using Java PCM in the Portal online documentation.

      Parameters:
      enable - Set to true to enable opcode logging.
    • isOpcodeLoggingEnabled

      public boolean isOpcodeLoggingEnabled()
      Checks if opcode logging is enabled.
      Returns:
      true if opcode logging is enabled.
    • opcode

      public FList opcode(int op, int flags, FList in) throws EBufException
      Sends an opcode to the server with a control flag. This method performs a PCM Opcode operation on an open context. The operation is synchronous, so the calling process waits until the operation is complete and has the return flist immediately available for inspection. For more information, see the PCM_OP() opcode in the Portal online documentation.
      Parameters:
      op - An opcode to perform. For a list of opcodes, see the PortalOp class.
      flags - Control flag for the opcode being called. See the individual opcode descriptions for information on the flags they take. NOTE: Most opcodes take no flags, which you enter as 0.
      in - The opcode input FList. For a list of mandatory and optional fields for the input flist, see the relevant opcode description, which provides a link to input flist specifications.
      Returns:
      The opcode output FList. For a list of mandatory and optional fields for the output flist, see the relevant opcode description, which provides a link to output flist specifications.
      Throws:
      EBufException - is thrown if an error occurs.
    • opcode

      public FList opcode(int op, FList in) throws EBufException
      Sends an opcode to the server. You can use this method if you don't have an opcode control flag to pass in. This method performs a PCM Opcode operation on an open context. The operation is synchronous, so the calling process waits until the operation is complete and has the return flist immediately available for inspection. For more information, see the PCM_OP() opcode in the Portal online documentation.
      Parameters:
      op - An opcode to perform. For a list of opcodes, see the PortalOp class.
      in - The opcode input FList. For a list of mandatory and optional fields for the input flist, see the relevant opcode description, which provides a link to input flist specifications.
      Returns:
      The opcode output flist. For a list of mandatory and optional fields for the output flist, see the relevant opcode description, which provides a link to output flist specifications.
      Throws:
      EBufException - is thrown if an error occurs.
    • opcodeSend

      public void opcodeSend(int op, FList in) throws EBufException
      Throws:
      EBufException
    • opcodeSend

      public void opcodeSend(int op, int flags, FList in) throws EBufException
      Throws:
      EBufException
    • isSocketChannelConnected

      public boolean isSocketChannelConnected()
    • isSocketChannelOpen

      public boolean isSocketChannelOpen()
    • isSocketChannelRegistered

      public boolean isSocketChannelRegistered()
    • getInetAddress

      public InetAddress getInetAddress()
    • getLocalAddress

      public InetAddress getLocalAddress()
    • getLocalPort

      public int getLocalPort()
    • getSocketChannelPort

      public int getSocketChannelPort()
    • getSocketChannelHashCode

      public int getSocketChannelHashCode()
    • opcodeReceive

      public FList opcodeReceive() throws EBufException
      Throws:
      EBufException
    • opcodeReceive

      public FList opcodeReceive(long socketTimeOutVal) throws EBufException
      Throws:
      EBufException
    • opcodeReceive

      public FList opcodeReceive(long timeOutVal, long socketTimeOutVal) throws EBufException
      Throws:
      EBufException
    • getUserID

      public Poid getUserID()
      Retrieves the user ID from the current connection.
      Returns:
      The user ID POID.
    • getSession

      public Poid getSession()
      Retrieves the session ID from the current connection.
      Returns:
      The session ID POID.
    • getUserName

      public String getUserName()
      Retrieves the user name from the current connection.
      Returns:
      The user name.
    • getHost

      public String getHost()
      Retrieves the host name from the current connection.
      Returns:
      The host name.
    • getPort

      public String getPort()
      Retrieves the port number from the current connection.
      Returns:
      The port number.
    • getCurrentDB

      public long getCurrentDB()
      Retrieves the database number the current context is connected to.
      Returns:
      The database number currently connected to.
    • getDefaultLog

      public static ErrorLog getDefaultLog() throws EBufException
      Retrieves the default error-log object.
      Returns:
      An ErrorLog object representing the default log, javapcm.log.
      Throws:
      EBufException - is thrown if an error occurs.
      See Also:
    • getUserProperty

      public static String getUserProperty(String key)
      Retrieves a property value from the Infranet.properties file.
      Parameters:
      key - The name of the property to look up.
      Returns:
      Returns the value associated with the property name, if found.
    • setLocalProperties

      public static void setLocalProperties(Properties uprops) throws EBufException
      Deprecated.
      This method is public to insure operability. It's for internal use only.
      Sets the configuration settings for the connection in a Properties object.
      Parameters:
      uprops - A Properties object containing configuration settings for the context.
      Throws:
      EBufException - thrown if an error occurs.
    • setAppName

      public static void setAppName(String appName)
      Sets the application keyword to use when looking up properties. This is global for all PortalContexts created in this VM.
      Parameters:
      appName - New application keyword.
    • parseConnectString

      public static void parseConnectString(String cStr, FList into) throws ParseException, EBufException
      Converts the connection string from URL format to flist format. A connection string is a string with Portal connection information in URL format. For example:

      'pcp://<username>:<password>@host:port/service/<service sub-type>'

      This method can be used to convert the connection string in the Infranet.properties file before passing it as an flist to the open method.

      Parameters:
      cStr - The connection string in URL format.
      into - The FList to parse into.
      Throws:
      EBufException - thrown if an error occurs.
      ParseException - thrown if unable to parse the string.
    • initHostnameAndProgramName

      public static void initHostnameAndProgramName(String pName)
      Initialize Hostname and Program name of corrleation id. This function will initialize Hostname and program_name required for correlation id. Only program name needs to be provided, Hostname will be generated internally.
      Parameters:
      pName - The programe name to be used in correlation id.
    • getContextInfoDetails

      public String getContextInfoDetails(FList in)
      Initialize Context Info details of corrleation id. This function will initialize Context Info details required for correlation id. The string is of the format ":brmuser:apiUser:xuser:xCord" and is constructed from the "FldContextInfo" field of the input Flist.
      Parameters:
      in - The input Flist passed to the function
    • genCorrelationId

      public static String genCorrelationId()
      Generates the unique correlation for each opcode. Assumes all parameters as default Internally calls genCorrelationId with default params.
      Returns:
      CorrelationId - The unique correlation id
    • genCorrelationId

      public static String genCorrelationId(int opcode)
      Generates the unique correlation for each opcode. Assumes all other parameters as default
      Parameters:
      opcode - - The opcode for which correlation id is required
      Returns:
      CorrelationId - The unique correlation id
    • genCorrelationId

      public static String genCorrelationId(String pName, int opcode, int salt)
      Generates the unique correlation for each opcode. Assumes all other parameters as default
      Parameters:
      pName - - The Program Name for which correlation id is required
      opcode - - The opcode for which correlation id is required
      salt - - The salt value
      Returns:
      CorrelationId - The unique correlation id
    • genCorrelationId

      public static String genCorrelationId(int opcode, String ctxStr, long opcodeTimeout)
      Generates the unique correlation for each opcode. Assumes all other parameters as default
      Parameters:
      opcode - - The opcode for which correlation id is required
      ctxStr - - The context string
      opcodeTimeout - - The value of PcmOpcodeTimeoutinUsecs
      Returns:
      CorrelationId - The unique correlation id
    • genCorrelationId

      public static String genCorrelationId(String pName, int opcode, int salt, String ctxStr, long opcodeTimeout)
      Generates the unique correlation for each opcode.
      Parameters:
      pName - - The Program Name for which correlation id is required
      opcode - - The opcode for which correlation id is required
      salt - - The salt value
      ctxStr - - The context string
      opcodeTimeout - - The value of PcmOpcodeTimeoutinUsecs
      Returns:
      CorrelationId - The unique correlation id
    • getCorrelationId

      public static String getCorrelationId()
    • setCorrelationId

      public static void setCorrelationId(String correlation)
    • sendCorrelation

      public static void sendCorrelation(FList inFlist)
    • getReasonCode

      public int getReasonCode()
    • recvCorrelation

      public static boolean recvCorrelation(FList inFlist)
    • getContext

      public com.portal.pcm.PCPContext getContext()
    • getTransState

      public int getTransState()
    • getSocketChannelListener

      public SocketChannelListener getSocketChannelListener()
    • setSocketChannelListener

      public void setSocketChannelListener(SocketChannelListener channelListener)
    • isInTransaction

      public boolean isInTransaction()
      Invoke this function to identify whether this PortalContext is invloved in transaction or not.
      Returns:
      true - if this PortalContext is involved in transaction
    • getCreatedTime

      public long getCreatedTime()
      Invoke this function to get the time when this PortalContext object is created. pcm.jar's ConnectionPool.java utilizes this function to re-establish PortalContext connection after every specific time interval.
      Returns:
      the time when this PortalContext object is created
    • readTLSVersionFromConfig

      public static String[] readTLSVersionFromConfig()