java.lang.Objectcom.microfocus.cobol.connector.PureCobolBean
J2EE Connector for Micro Focus COBOL
| Constructor Summary | |
PureCobolBean()
Constructor for a PureCobolBean |
|
| Method Summary | |
void |
Activate()
Activate a action after it has been passivated. |
int |
cobcall(String program)
Calls a COBOL program with no parameters, return-code is returned as a int. |
int |
cobcall(String program,
com.microfocus.cobol.lang.ParameterList inParameters,
com.microfocus.cobol.lang.ParameterList outParameters)
Calls a COBOL program with a ParameterList and returns return-code as a int. |
void |
Disconnect()
|
void |
dispose()
Dispose this instance of a PureCobolBean. |
static PureCobolBean |
getActiveConnection(String guid)
Get a active PureCobolBean given just a GUID |
static long |
getActiveConnectionCount()
|
static String |
getActiveConnectionDebugInfo()
|
static Enumeration |
getActiveConnections()
get a Enumeration of active connections This is provided for debug purposes only |
Object |
getBeanProperty(String key)
gets a Bean's property or returns null if not found |
Object |
getBeanProperty(String key,
Object defaultObject)
gets a Bean's Property or a specified default Object if not found |
boolean |
getIsInitial()
returns the "is initial" boolean flag |
String |
getSessionIdentifier()
get the session identifier (GUID) for the current PureCobolBean instance |
long |
getTimeout()
Get the current reqyested timeout or zero if not set |
boolean |
isConnected()
|
void |
Passivate()
Send a passivate message to the server and disconnect from server |
void |
setBeanIsInitial(boolean beanInitial)
Sets the "Is initial" state of any programs called from a instance of a COBOL Bean. When set to true, it ensures that the COBOL program being "cob[r]call"'ed is always in it's initial state. |
void |
setBeanProperty(String key,
Object data)
sets a property associated with the bean, for example to set a user/password for remote connection use: |
void |
setRemoteBeanURL(String beanURI)
Specifies the remote bean URL, eg: LocalCobolBean: in process bean CobolBean: out of process bean (via Enterprise Server) TraceBean: trace class to trace a LocalCobolBean or TraceBean |
void |
setTimeout(long timeout)
set the timeout for the current PureCobolBean |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PureCobolBean()
throws com.microfocus.cobol.CobolException,
Exception
com.microfocus.cobol.CobolException
Exception -
public myCobolBean extends com.microfocus.cobol.PureCobolBean
{
public myPureCobolBean()
{
super(); // ensure parent constructor is invoked.
}
public void setName(String name) throws CobolException, Exception
{
super.cobcall("setName", new ParameterList().add(name));
}
}
| Method Detail |
public void setRemoteBeanURL(String beanURI)
throws com.microfocus.cobol.CobolException
beanURI - a string as specified above
com.microfocus.cobol.CobolException
UnknownHostException
public void setBeanIsInitial(boolean beanInitial)
throws com.microfocus.cobol.CobolException
beanInitial - required "is initial" state
com.microfocus.cobol.CobolExceptionpublic boolean isConnected()
public boolean getIsInitial()
public void setBeanProperty(String key,
Object data)
throws com.microfocus.cobol.CobolException
bean.setBeanProperty("username","myid");
bean.setBeanProperty("password","mypassword");
key - a string eg: usernamedata - a string eg: password
com.microfocus.cobol.CobolException
public Object getBeanProperty(String key,
Object defaultObject)
key - a stringdefaultObject - a string
public Object getBeanProperty(String key)
key - a string
public int cobcall(String program)
throws com.microfocus.cobol.CobolException,
Exception
program - a string
com.microfocus.cobol.CobolException - - COBOL Exception
Exception - - NON COBOL Exception
public int cobcall(String program,
com.microfocus.cobol.lang.ParameterList inParameters,
com.microfocus.cobol.lang.ParameterList outParameters)
throws com.microfocus.cobol.CobolException,
Exception
program - a stringinParameters - a ParameterListoutParameters - a blank ParameterList
com.microfocus.cobol.CobolException - - COBOL Exception
Exception - - NON COBOL Exception
public void dispose()
throws com.microfocus.cobol.CobolException,
Exception
com.microfocus.cobol.CobolException - - COBOL Exception
Exception - - NON COBOL Exception
public void Passivate()
throws com.microfocus.cobol.CobolException
com.microfocus.cobol.CobolException
public void Activate()
throws com.microfocus.cobol.CobolException
com.microfocus.cobol.CobolException
public void setTimeout(long timeout)
throws com.microfocus.cobol.CobolException
timeout - a long timeout in milliseconds
com.microfocus.cobol.CobolExceptionpublic long getTimeout()
public String getSessionIdentifier()
public void Disconnect()
throws com.microfocus.cobol.CobolException
com.microfocus.cobol.CobolExceptionpublic static PureCobolBean getActiveConnection(String guid)
guid - a string representing guid of a active connection
public static Enumeration getActiveConnections()
public static long getActiveConnectionCount()
public static String getActiveConnectionDebugInfo()
Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.