|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.sagd.PMQServer.PMQResource
public class PMQResource
An instance of the class controls all allocated EntireX and PMQ
objects which are created inside the context or added with
the add()
method.
PMQInputStream.main(String[])
or PMQOutputStream.main(String[])
,
how to use this class.
Constructor Summary | |
---|---|
PMQResource(boolean isServer)
Contructs an resource object and acts as server. |
|
PMQResource(java.lang.String mode)
Creates a new resource object. |
Method Summary | |
---|---|
void |
add(com.softwareag.entirex.aci.Broker broker)
Adds a broker in this resource. |
void |
add(com.softwareag.entirex.aci.BrokerService service)
Adds BrokerService object. |
void |
add(PMQInputStream input)
Adds the input stream into this resource object. |
void |
add(PMQOutputStream output)
Adds the output stream into this resource object. |
com.softwareag.entirex.aci.Broker |
addBroker(java.lang.String brokerId,
java.lang.String user,
java.lang.String token,
java.lang.String password)
Adds the created Broker object in this resource object. |
com.softwareag.entirex.aci.Broker |
addBroker(java.lang.String brokerId,
java.lang.String user,
java.lang.String token,
java.lang.String password,
int traceLevel)
Adds the created Broker object in this resource object. |
PMQInputStream |
addInputStream(boolean withOld)
Add, create and return an input stream. |
PMQOutputStream |
addOutputStream(boolean withOld)
Add, create and return an output stream. |
void |
addService(java.lang.String serviceName)
Adds Broker service or a publication to this resource depending on serviceName. |
void |
backout()
Backout all opened transactions and release allocated objects. |
void |
cleanup()
All allocated and remembered Broker and BrokerService objects are released. |
void |
commit()
Commit all opened UOWs and cleanup the allocated resources. |
static com.softwareag.entirex.aci.Broker |
createBroker(java.lang.String brokerId,
java.lang.String user,
java.lang.String token,
java.lang.String password)
Creates and returns an EntireX Broker object without tracing. |
static com.softwareag.entirex.aci.Broker |
createBroker(java.lang.String brokerId,
java.lang.String user,
java.lang.String token,
java.lang.String password,
int traceLevel,
java.io.PrintWriter output)
Creates and returns an EntireX Broker object with tracing option. |
PMQResource |
createNode(boolean isServer)
Creates a new resource node and adds into the list. |
PMQResource |
createNode(java.lang.String mode)
Creates next resource node. |
protected void |
finalize()
Cleanup allocated resources. |
java.lang.String |
getContextData()
Returns the context data of this allocated stream. |
PMQInputStream |
getInputStream()
Returns the allocated input stream of this resource. |
PMQOutputStream |
getOutputStream()
Returns the allocated output stream of this resource. |
java.lang.String |
getPublicationTopic(java.lang.String serviceName)
Returns the topic name of the service name. |
com.softwareag.entirex.aci.BrokerService |
getService()
Returns the allocated Broker service object. |
java.lang.String |
getUnitOfWorkID()
Returns the Unit of Work ID of all allocated resources. |
boolean |
isPublication(java.lang.String serviceName)
Returns true if serviceName contains a publication topic name. |
boolean |
prepareCommit()
Prepare all resources to commit the streams in the next commit statement. |
void |
setCleanupOnFinalize(boolean value)
Set value to true , if this resource should cleanup on
the CG finalize. |
void |
setPrepareCommitActivityTime(long time)
Set new wait time to do no prepareCommit() check. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PMQResource(boolean isServer)
public PMQResource(java.lang.String mode)
server
value for parameter
mode
to act as server.
Method Detail |
---|
public PMQResource createNode(java.lang.String mode)
public PMQResource createNode(boolean isServer)
public void add(com.softwareag.entirex.aci.Broker broker)
public void add(com.softwareag.entirex.aci.BrokerService service) throws java.lang.Exception
java.lang.Exception
public void add(PMQInputStream input)
public void add(PMQOutputStream output)
public void commit() throws java.io.IOException
prepareCommit()
transaktion.
java.io.IOException
- if transaction failspublic void backout()
public boolean prepareCommit() throws java.io.IOException
java.io.IOException
- if next commit()
is not possiblepublic void setPrepareCommitActivityTime(long time)
prepareCommit()
check. The default is 5 seconds.
time
- in millisecondspublic void cleanup()
public com.softwareag.entirex.aci.Broker addBroker(java.lang.String brokerId, java.lang.String user, java.lang.String token, java.lang.String password) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public com.softwareag.entirex.aci.Broker addBroker(java.lang.String brokerId, java.lang.String user, java.lang.String token, java.lang.String password, int traceLevel) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public void addService(java.lang.String serviceName) throws com.softwareag.entirex.aci.BrokerException, java.lang.Exception
com.softwareag.entirex.aci.BrokerException
java.lang.Exception
public boolean isPublication(java.lang.String serviceName)
true
if serviceName
contains a publication topic name.
public java.lang.String getPublicationTopic(java.lang.String serviceName)
public java.lang.String getUnitOfWorkID()
public com.softwareag.entirex.aci.BrokerService getService()
public java.lang.String getContextData()
public PMQInputStream addInputStream(boolean withOld) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public PMQOutputStream addOutputStream(boolean withOld) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public PMQInputStream getInputStream()
public PMQOutputStream getOutputStream()
public static com.softwareag.entirex.aci.Broker createBroker(java.lang.String brokerId, java.lang.String user, java.lang.String token, java.lang.String password) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public static com.softwareag.entirex.aci.Broker createBroker(java.lang.String brokerId, java.lang.String user, java.lang.String token, java.lang.String password, int traceLevel, java.io.PrintWriter output) throws com.softwareag.entirex.aci.BrokerException
com.softwareag.entirex.aci.BrokerException
public void setCleanupOnFinalize(boolean value)
value
to true
, if this resource should cleanup on
the CG finalize. The default initialization is false
.
protected void finalize()
finalize
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |