|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.redback.redbeans.RedObject
The RedObject class is the main manager class and is created to represent a RBO class instance on the client. It calls RBO Server methods on behalf of it's client and may store all state for that RBO class. Note that if used within a J2EE server and accessed using stateless beans, the RedObject could be reused from a pool and the state will therefore need to be passed in.
Field Summary | |
static java.lang.String |
GETALLDELIM
|
static java.lang.String |
RBSRVREL
|
static java.lang.String |
RECDELIM
|
Constructor Summary | |
RedObject()
Creates instance without reference to connection or RBOClass. |
|
RedObject(Connection activeConnection,
java.lang.String RBOClass)
Creates instance and associates current connection details and RBOClass |
|
RedObject(java.lang.String RBOAccount,
java.lang.String RBOClass)
Creates instance and associates current connection details and RBOClass |
Method Summary | |
void |
addDebugListener(RbEventListener l)
Register an objects interest in receiving debug events |
RecordSet |
callMethod(java.lang.String methodName)
Will call the specified method for the current RBO. |
RecordSet |
callRPC(java.lang.String methodName,
java.lang.String param1,
java.lang.String param2)
calls RPC method within the RBO server |
protected void |
fireRbDebugEvent(java.lang.String sval)
Fire off a new RbEvent to notify listeners of a new 'debug' string message. |
Connection |
getActiveConnection()
|
static char |
getAM()
|
protected java.util.Vector |
getDispFields()
Gets all the display fileds |
protected java.lang.String |
getEncode(java.lang.String val)
get query strings with "+" for a " " don't get encoded in redback app server |
java.lang.String |
getHiddenField(java.lang.String fldName)
|
java.lang.String |
getHidFields()
Get non-null hidden-field values and return as a string in the format 'name=value&name=value ..etc' |
RbException |
getLastRbe()
used by Servlets and Threadpools as exception cannot be thrown by runnable run() set and get via RBRunnable, API routines, not set by RedObject |
java.lang.String |
getModule()
Gets the module name. |
java.util.Hashtable |
getMonitorData()
Gets 'shallow clone' of the contents of monitor data. |
java.lang.String |
getPassword()
Gets current password. |
java.lang.String |
getPostedReply()
Get the last posted repaly. |
java.lang.String |
getPostedString()
Gets the last posted String. |
protected java.lang.String |
getPostURL(java.lang.String methodName)
|
java.lang.String |
getProperty(java.lang.String propertyName)
Get current value for a given property name. |
java.util.Vector |
getPropertyNames()
Gets the current RBO property names. |
java.util.Vector |
getPropertyValues()
|
java.lang.String |
getRBOAccount()
|
java.lang.String |
getRBOClass()
|
java.lang.String |
getRBOHandle()
|
RecordSet |
getRecordSet()
|
java.lang.String |
getRPCResponse()
|
java.lang.String |
getServerAlert()
|
java.lang.String |
getSessionId()
|
java.lang.String |
getSessionUserId()
Deprecated. no longer required. You should either use getSessionId() or
getRBOHandle() |
static char |
getSVM()
|
java.lang.String |
getURLAccountName()
|
java.lang.String |
getUserId()
|
static char |
getVM()
|
boolean |
hasIsHttp()
|
boolean |
isDebugOn()
|
boolean |
isInApplet()
Deprecated. will now always return false |
boolean |
isMonitorOn()
|
void |
open()
Open the RBOClass, which will create an instance for it. |
void |
open(java.lang.String urlAccount)
calls open method and does not require a connection object to be created |
void |
open(java.lang.String userId,
java.lang.String password)
Will create RPLOGIN and check user id and password. |
protected java.lang.String |
postRequest(java.lang.String urlString,
java.lang.String postString)
used to perform a POST |
java.util.Vector |
refresh(java.lang.String handle)
Will refresh this instance with RBO Server state for the required session as determined by the handle passed. |
java.util.Vector |
refresh(java.lang.String sessionId,
java.lang.String sessionUserId)
Deprecated. as refresh now only requires the RBOHandle |
void |
removeDebugListener(RbEventListener l)
Remove an object from list of those interested in receiving debug events |
void |
setActiveConnection(Connection activeConnection)
Sets the current connection instance |
static void |
setAM(char newAM)
sets the AM character, only really required if the AM character is not the default 254 |
void |
setDebugOn(boolean flag)
Determines whether debug is on or off |
protected void |
setDispFields(java.lang.String newValue)
Set the internal dispFields class attribute to the passed in value |
protected void |
setHiddenField(java.lang.String fldname,
java.lang.String value)
Set a hidden-field value for a specified 'name'. |
protected void |
setHidFields(java.lang.String serverReply)
sets Hidden fields from a Server reply |
void |
setInApplet(boolean flag)
Deprecated. |
void |
setLastRbe(RbException rbe)
|
void |
setMonitorOn(boolean flag)
|
void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Set current value for a given property name. |
void |
setPropertyNames(java.util.Vector propNames)
sets the current property names |
void |
setPropertyValues(java.util.Vector propVals)
sets the current property values, values must match position dictated by the property names |
void |
setRBOAccount(java.lang.String RBOAccount)
Sets RBO Account to connect to. |
void |
setRBOClass(java.lang.String RBOClass)
Sets the current RBO class name, can also be set when creating instance of this class |
void |
setRBOHandle(java.lang.String handle)
Sets the current RBOHandle details for the current RBO. |
void |
setRecordSet(RecordSet recordSet)
|
void |
setSessionId(java.lang.String sessionId)
If this RedObject is to pick up an existing session id then you can set it using this method. |
void |
setSessionUserId(java.lang.String userId)
Deprecated. no longer required. |
static void |
setSVM(char newSVM)
sets the current SVM character, only required of not the default of 252 |
void |
setURLAccount(java.lang.String urlAccountName)
sets the URL/accountname or account name (if using jni gateway) for this rbo instance |
static void |
setVM(char newVM)
sets the current VM character, only required of not the default of 253 |
java.lang.String |
URLDecode(java.lang.String str)
This method decodes the given urlencoded string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GETALLDELIM
public static final java.lang.String RECDELIM
public static final java.lang.String RBSRVREL
Constructor Detail |
public RedObject()
public RedObject(Connection activeConnection, java.lang.String RBOClass)
activeConnection
- the Connection class that contains the URL to connectRBOClass
- the class (module:classname) to create an instance of that RBOClasspublic RedObject(java.lang.String RBOAccount, java.lang.String RBOClass)
RBOAccount
- the RBO Account to connect toRBOClass
- the class (module:classname) to create an instance of that RBOClassMethod Detail |
public void setRBOAccount(java.lang.String RBOAccount)
RBO
- account to connect topublic java.lang.String getRBOAccount()
public void addDebugListener(RbEventListener l)
public RecordSet callMethod(java.lang.String methodName) throws RbException
public RecordSet callRPC(java.lang.String methodName, java.lang.String param1, java.lang.String param2) throws RbException
methodName
- is the method to callparam1
- is first parameterparam2
- is the second parameterprotected void fireRbDebugEvent(java.lang.String sval)
public Connection getActiveConnection()
public static char getAM()
protected java.util.Vector getDispFields()
protected java.lang.String getEncode(java.lang.String val)
public java.lang.String getHiddenField(java.lang.String fldName)
fldName
- the hidden field namepublic java.lang.String getHidFields()
public RbException getLastRbe()
public java.lang.String getModule()
public java.util.Hashtable getMonitorData()
public java.lang.String getPassword()
public java.lang.String getPostedReply()
public java.lang.String getPostedString()
protected java.lang.String getPostURL(java.lang.String methodName)
public java.lang.String getProperty(java.lang.String propertyName)
propertyname
- the name of the property whose value should be returnedpublic java.util.Vector getPropertyNames()
public java.util.Vector getPropertyValues()
public java.lang.String getRBOClass()
public RecordSet getRecordSet()
public java.lang.String getRPCResponse()
public java.lang.String getServerAlert()
public java.lang.String getRBOHandle()
public void setRBOHandle(java.lang.String handle)
handle
- the current handle, as returned by a previous call to getRBOHandle()
public java.lang.String getSessionId()
public java.lang.String getSessionUserId()
getSessionId()
or
getRBOHandle()
public static char getSVM()
public java.lang.String getURLAccountName()
public java.lang.String getUserId()
public static char getVM()
public boolean hasIsHttp()
public boolean isDebugOn()
public boolean isInApplet()
false
public boolean isMonitorOn()
public void open() throws RbException
RbException
- thrown if open cannot take place. Can be a connection error, redbeans
error or server errorpublic void open(java.lang.String urlAccount) throws RbException
urlAccount
- the URL/accountname or account name (if using jni gateway)
to connect to rbo classpublic void open(java.lang.String userId, java.lang.String password) throws RbException
protected java.lang.String postRequest(java.lang.String urlString, java.lang.String postString) throws RbException
urlString
- the url to POST topostString
- the string to POSTpublic java.util.Vector refresh(java.lang.String handle) throws RbException
handle
- which would have been objtained using the getRBOHandle()
methodpublic java.util.Vector refresh(java.lang.String sessionId, java.lang.String sessionUserId) throws RbException
RBOHandle
session
- IDsession
- User IDrefresh(String RBOHandle)
public void removeDebugListener(RbEventListener l)
public void setActiveConnection(Connection activeConnection)
activeConnection
- the current Connection instancepublic static void setAM(char newAM)
newAM
- the AM characterpublic void setDebugOn(boolean flag)
flag
- if true
then RbEvent will be fired each time debug information
is available.protected void setDispFields(java.lang.String newValue)
newValue
- - list of display fields names, each separated by a space.protected void setHiddenField(java.lang.String fldname, java.lang.String value) throws RbException
fldName
- the name of the hidden fieldvalue
- the value to setRbException
- thrown if the hidden field is not foundprotected void setHidFields(java.lang.String serverReply) throws RbException
public void setInApplet(boolean flag)
public void setLastRbe(RbException rbe)
last
- RbException thrown
used by Servlets and Threadpools as exception cannot be thrown by runnable run()
set and get via RBRunnable, API routines, not set by RedObjectpublic void setMonitorOn(boolean flag)
flag
- to specify whether or not the performance monitor should be switched on/offpublic void setProperty(java.lang.String propertyName, java.lang.String value)
propertyName
- relates to a property defined in the RBOvalue
- the current value of the propertypublic void setPropertyNames(java.util.Vector propNames)
propNames
- the property namespublic void setPropertyValues(java.util.Vector propVals)
propVals,
- the property values to setpublic void setRBOClass(java.lang.String RBOClass)
RBOClass
- the RBO class (module:classname)public void setRecordSet(RecordSet recordSet)
recordSet
- sets the current recordset (can be null)public void setSessionId(java.lang.String sessionId)
public void setSessionUserId(java.lang.String userId)
public static void setSVM(char newSVM)
the
- current SVM characgerpublic void setURLAccount(java.lang.String urlAccountName)
public static void setVM(char newVM)
the
- current VM characgerpublic java.lang.String URLDecode(java.lang.String str) throws RbException
str
- the url-encoded stringParseException
- If a '%' is not followed by a valid
2-digit hex number.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |