com.ibm.redback.runtime
Class RBJob

java.lang.Object
  |
  +--com.ibm.redback.runtime.RBJob

public class RBJob
extends java.lang.Object


Field Summary
protected  java.lang.String objName
           
protected  RBState ourState
           
protected  java.util.Vector rbNames
           
protected  RecordSet rs
           
protected  java.lang.String URL
           
 
Constructor Summary
RBJob()
          Constructor for RBJob.
 
Method Summary
 RBState callMethod(RBState ourState, java.lang.String methodName)
           
 RBState createObj(java.lang.String URL, java.lang.String objName)
          Called when the client wants to create the RBO instance.
 RBState getOurState()
          Method returns current RBO state.
 java.lang.String getProperty(RBState ourState, java.lang.String name)
          This method returns the current value for the property name passed.
 RecordSet getRecordSet(RBState ourState)
          This method returns the record set from current state.
 java.lang.String getSessionId()
          Gets the session id set in the current state.
 RBState refresh(RBState ourState)
          Will refresh the state from the RBO Server
 void setOurState(RBState newOurState)
          This method sets the current state to the state passed to the method.
 RBState setProperty(RBState ourState, java.lang.String name, java.lang.String value)
          Sets a property with a given value for the passed client state.
 RBState setRecordSet(RBState ourState, RecordSet rs)
          This method returns the record set from the current rbo state.
 void setSessionId(java.lang.String sessionId)
          Sets the current session Id in the state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objName

protected java.lang.String objName

URL

protected java.lang.String URL

ourState

protected RBState ourState

rs

protected RecordSet rs

rbNames

protected java.util.Vector rbNames
Constructor Detail

RBJob

public RBJob()
Constructor for RBJob.
Method Detail

callMethod

public RBState callMethod(RBState ourState,
                          java.lang.String methodName)
                   throws RbException

createObj

public RBState createObj(java.lang.String URL,
                         java.lang.String objName)
                  throws RbException
Called when the client wants to create the RBO instance. Will create the RedObject and do all initialisation required
Parameters:
objName - the name of the RBO, module:objectname
URL - the URL for the RedBack account, either the full URL or RedBack account name if using JRGW
Throws:
RbException - thrown if open fails

getOurState

public RBState getOurState()
Method returns current RBO state.
Returns:
RBState which contains current RBO state information for this instance

setRecordSet

public RBState setRecordSet(RBState ourState,
                            RecordSet rs)
This method returns the record set from the current rbo state.
Parameters:
ourState - the current state
rs - the current recordSet

getRecordSet

public RecordSet getRecordSet(RBState ourState)
This method returns the record set from current state.
Parameters:
current - state is passed to the method.

getProperty

public java.lang.String getProperty(RBState ourState,
                                    java.lang.String name)
                             throws RbException
This method returns the current value for the property name passed.
Parameters:
ourState - the current RBO state for this instance
name - the property name
Throws:
RbException - thrown if the property name cannot be found

setSessionId

public void setSessionId(java.lang.String sessionId)
Sets the current session Id in the state.
Parameters:
sessionId - the current RBO Session ID which can be assigned to the RBO created by this EJB so that state within the RBO server can be associated with the current session

getSessionId

public java.lang.String getSessionId()
Gets the session id set in the current state.

refresh

public RBState refresh(RBState ourState)
                throws RbException
Will refresh the state from the RBO Server
Parameters:
ourSession - which is the current state for the client

setOurState

public void setOurState(RBState newOurState)
This method sets the current state to the state passed to the method.
Parameters:
newOurState - which will replace current RBState for this instance

setProperty

public RBState setProperty(RBState ourState,
                           java.lang.String name,
                           java.lang.String value)
                    throws RbException
Sets a property with a given value for the passed client state. The value is set in the client state and will not update the RBO Server state until a CallMethod is invoked
Parameters:
ourState - current client state
name - the property name
value - the value to set
Throws:
RbException - thrown if the property name cannot be found