|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.entirex.aci.BrokerService com.softwareag.entirex.aci.RPCService
public abstract class RPCService
This abstract subclass of BrokerService represents a Broker service used
by EntireX RPC.
The client stub and server stub generated by the Java Wrapper are
subclasses of RPCService.
You should not call the methods of the superclass BrokerService
directly.
Field Summary | |
---|---|
static int |
RELIABLE_AUTO_COMMIT
RELIABLE_AUTO_COMMIT = 1 |
static int |
RELIABLE_CLIENT_COMMIT
RELIABLE_CLIENT_COMMIT = 2 |
static int |
RELIABLE_OFF
RELIABLE_OFF = 0 |
Fields inherited from class com.softwareag.entirex.aci.BrokerService |
---|
DEFAULT_WAITTIME |
Constructor Summary | |
---|---|
protected |
RPCService()
Creates an RPCService object without parameters. |
protected |
RPCService(BrokerService brokerService,
java.lang.String libName,
boolean compress)
Creates an RPCService object. |
protected |
RPCService(Broker broker,
java.lang.String serverAddr,
java.lang.String libName)
Creates an RPCService object. |
protected |
RPCService(Broker broker,
java.lang.String serverAddr,
java.lang.String libName,
boolean compress)
Creates an RPCService object. |
Method Summary | |
---|---|
void |
closeConversation()
Closes the running RPC conversation. |
void |
closeConversationCommit()
Closes the running RPC conversation. |
boolean |
getCompression()
Returns the current setting for compression. |
protected Conversation |
getConversation()
Returns the Conversation object. |
java.lang.String |
getLibraryName()
Returns the current value of the library name used by the RPC. |
java.lang.String |
getMessageID()
Gets the message id (valid for reliable RPC). |
boolean |
getNaturalLogon()
Returns the current setting for logon to Natural Security for Natural RPC servers. |
java.lang.String |
getProgramName()
Returns the current value of the RPC subprogram name. |
int |
getReliable()
Gets the mode for reliable RPC. |
java.lang.String |
getRPCPassword()
Gets the RPC password (used with NATURAL logon). |
java.lang.String |
getRPCUserId()
Returns the user ID which is used by the RPCs. |
java.lang.String |
getStatusOfMessage(java.lang.String messageID)
Gets the status of the message identified by the message id (valid for reliable RPC). |
protected void |
onEnter(java.lang.String progname)
User exit method called at the beginning of a generated method. |
protected void |
onException(java.lang.String progname,
BrokerException exception)
User exit method called when an exception which is an instance of BrokerException is thrown in the generated method. |
protected void |
onLeave(java.lang.String progname,
int sendLength,
int receiveLength)
User exit method called at the end of a generated method. |
protected boolean |
onRetry(java.lang.String progname,
BrokerException exception)
User exit method called when an exception which is an instance of BrokerException is thrown in the generated method. |
java.lang.String |
ping()
Sends an RPC PING command to the service and returns the response string. |
void |
reliableCommit()
Commit a transaction (unit of work) for reliable RPC. |
void |
reliableRollback()
Roll back a transaction (unit of work) for reliable RPC. |
void |
setBroker(Broker broker)
Dynamically assigns the instance of a Broker object. |
void |
setCompression(boolean rpcCompression)
Switches RPC compression ON or OFF. |
void |
setConversation(Conversation conversation)
Enables conversational RPC. |
void |
setLibraryName(java.lang.String libName)
Changes the library name used by the RPC. |
void |
setNaturalLogon(boolean logon)
Enables or disables logon to Natural Security for Natural RPC servers. |
void |
setReliable(int mode)
Sets reliable RPC mode. |
void |
setRpcLibrary(java.lang.String libraryName)
Sets the RPC library name which is send to the broker with the RPCLIB keyword. |
void |
setRPCPassword(java.lang.String password)
Changes the password used for an RPC. |
void |
setRpcProgram(java.lang.String programName)
Sets the RPC program name which is send to the broker with the RPCPGM keyword. |
void |
setRPCUserId(java.lang.String userId)
Changes the user ID used for an RPC call. |
void |
setServerAddress(java.lang.String serverAddr)
Dynamically assigns the server address. |
Methods inherited from class com.softwareag.entirex.aci.BrokerService |
---|
cancelallConversations, deregister, deregisterImmediate, endallConversations, getBroker, getCharacterEncoding, getDefaultWaittime, getEnvironment, getMaxReceiveLen, getServerClass, getServerName, getServiceName, isGeneric, receive, receive, receiveAny, receiveAttachInfo, receiveOld, register, registerAttach, replyError, send, sendReceive, sendReceive, setAdjustReceiveLen, setDefaultWaittime, setEnvironment, setLogicalBroker, setLogicalBroker, setLogicalBroker, setLogicalService, setLogicalService, setMaxReceiveLen, toString, useCodePage, useCodePage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RELIABLE_OFF
public static final int RELIABLE_AUTO_COMMIT
public static final int RELIABLE_CLIENT_COMMIT
Constructor Detail |
---|
protected RPCService(Broker broker, java.lang.String serverAddr, java.lang.String libName, boolean compress)
broker
- A Broker instance.serverAddr
- The server address (class/name/service).libName
- The default library name.compress
- Compression ON/OFF.protected RPCService(BrokerService brokerService, java.lang.String libName, boolean compress)
brokerService
- A BrokerService instance.libName
- The default library name.compress
- Compression ON/OFF.protected RPCService(Broker broker, java.lang.String serverAddr, java.lang.String libName)
broker
- A Broker instance.serverAddr
- The server address (class/name/service).libName
- The default library name.protected RPCService()
Method Detail |
---|
public final void setRPCUserId(java.lang.String userId)
userId
- The new user ID.public final java.lang.String getRPCUserId()
public final void setRPCPassword(java.lang.String password)
logon
method. At the moment this is only used by Natural RPC servers
running with Natural Security.
password
- The new Password.public final java.lang.String getRPCPassword()
public final void setBroker(Broker broker) throws BrokerException
broker
- A Broker instance.
BrokerException
- A BrokerException.public final void setServerAddress(java.lang.String serverAddr) throws BrokerException
serverAddr
- The server address (class/name/service).
BrokerException
- A BrokerException.public final void setLibraryName(java.lang.String libName)
libName
- The new library name (maximum 8 characters).public java.lang.String getLibraryName()
public java.lang.String getProgramName()
public final void setNaturalLogon(boolean logon)
logon
- true
to enable, false
to disable.public final boolean getNaturalLogon()
true
if enabled, false
if disabled.public final void setCompression(boolean rpcCompression)
rpcCompression
- true
if ON, false
if OFF.public final boolean getCompression()
true
if ON, false
if OFF.public final void setRpcProgram(java.lang.String programName)
programName
- the program name.public final void setRpcLibrary(java.lang.String libraryName)
libraryName
- the library name.public final void setConversation(Conversation conversation)
conversation
- A non-null Conversation object.
java.lang.IllegalArgumentException
- Thrown if no conversation is specified.
java.lang.IllegalStateException
- if this service is already used for reliable RPC.protected final Conversation getConversation()
public final void closeConversation() throws BrokerException
BrokerException
- A BrokerException.public final void closeConversationCommit() throws BrokerException
BrokerException
- A BrokerException.public final void reliableCommit() throws BrokerException
BrokerException
- if the broker call to commit the messages fails.public final void reliableRollback() throws BrokerException
BrokerException
- if the broker call to commit the messages fails.public final java.lang.String getMessageID()
reliableCommit()
or reliableRollback()
in
RELIABLE_CLIENT_COMMIT
mode and after sending a message in
RELIABLE_AUTO_COMMIT
mode.
public final java.lang.String getStatusOfMessage(java.lang.String messageID) throws BrokerException
messageID
- the message id obtained by a previous call of
getMessageID()
.
BrokerException
- if the Broker call fails.protected void onEnter(java.lang.String progname) throws BrokerException
progname
- The RPC program name.
BrokerException
- A BrokerException.protected void onLeave(java.lang.String progname, int sendLength, int receiveLength) throws BrokerException
progname
- The RPC program name.sendLength
- length of send bufferreceiveLength
- length of receive buffer
BrokerException
- A BrokerException.protected void onException(java.lang.String progname, BrokerException exception) throws BrokerException
BrokerException
is thrown in the generated method.
After calling this method the exception is thrown again. There
is no need to throw the exception in the implementation of this method.
This method has a default implementation and can be overriden in the
Java Wrapper Customization class.
progname
- The RPC program name.exception
- reference to the exception, which is thrown in the
generated method.
BrokerException
- A BrokerException.protected boolean onRetry(java.lang.String progname, BrokerException exception) throws BrokerException
BrokerException
is thrown in the generated method.
This method is only called when the exception is thrown during the
processing of the RPC. If this method returns false
, the
exception will be thrown again and the onException
method
is called. If this method returns true
, the RPC will be
executed once again. If the second RPC fails, onException
will be called immediately. This method has a default implementation
and can be overridden in the Java Wrapper Customization class.
progname
- The RPC program name.exception
- reference to the exception which is thrown in the
generated method.
BrokerException
- A BrokerException.public java.lang.String ping() throws BrokerException
BrokerException
- if a Broker error occurs.public final int getReliable()
RELIABLE_OFF
, RELIABLE_AUTO_COMMIT
,
RELIABLE_CLIENT_COMMIT
.
public final void setReliable(int mode)
RELIABLE_OFF
,
RELIABLE_AUTO_COMMIT
, RELIABLE_CLIENT_COMMIT
.
mode
- the reliable RPC mode to set
java.lang.IllegalStateException
- if this service is already used for reliable RPC.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |