fccsc.manager.broker
Class EntireXBroker

java.lang.Object
  |
  +--fccsc.manager.broker.EntireXBroker

public final class EntireXBroker
extends java.lang.Object

A EntireXBroker object encapsulates the main communication gateway to a mainframe via an EntireX Java interface client that communicates to a broker server module running on a mainframe.

The following is sample code on how-to create send and receive a message through broker:



  // create a broker communication interface
 EntireXBroker broker = new EntireXBroker(
 							"etb227:9999", "UTLI01P1", "DEVL",
 							"STSI01N0", "BLAH", false, "30S", 30000 );

 OR use a property file with required parameters ...

 Properties    prop   = load properties file ...
 EntireXBroker broker = new EntireXBroker( prop );

 // send request message
  broker.sendMessage( "" );

 // get response message
 String response = broker.getResponse();


 Broker exception information written to log files and standard out:
 -------------------------------------------------------------------
 Format:    Broker Error [CLASS] [CODE] [MESSAGE]
 Examples:  Broker Error 0002 0002: User does not exist
            Broker Error 0196 0196: Disconnected due to new location
 -------------------------------------------------------------------

 

Version:
1.0, 01/02/2002
Author:
Tony Blanco

Constructor Summary
EntireXBroker(java.util.Properties p_prop)
          This class encapsulates the ability to communicate with the Entire X Broker on the mainframe using the Entire X Java interface client.
EntireXBroker(java.lang.String p_brokerID, java.lang.String p_serverClass, java.lang.String p_serverName, java.lang.String p_service, java.lang.String p_userId, boolean p_uow, java.lang.String p_uowTimeout, int p_uowMaxLength)
          This class encapsulates the ability to communicate with the Entire X Broker on the mainframe using the Entire X Java interface client.
 
Method Summary
 java.lang.String getBrokerId()
          Returns the Broker Id.
 java.lang.String getResponse()
          Returns the response message received from our transmission.
 java.lang.String getServerClass()
          Returns the Server Class.
 java.lang.String getServerName()
          Returns the Server Name.
 java.lang.String getService()
          Returns the Service.
 int getUOWMaxLength()
          Returns the UOW Max Recieve Length.
 java.lang.String getUOWTimeout()
          Returns the UOW Timeout.
 java.lang.String getUserId()
          Returns the User Id.
 boolean isUOW()
          Returns if this broker instance is for a Unit Of Work.
 void sendMessage(java.lang.String p_message)
          Sends a message to broker and waits for a return message response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntireXBroker

public EntireXBroker(java.util.Properties p_prop)
This class encapsulates the ability to communicate with the Entire X Broker on the mainframe using the Entire X Java interface client. Parameters to instantiate this object are loaded from a properties file.

Parameters:
p_prop - a properties object.

EntireXBroker

public EntireXBroker(java.lang.String p_brokerID,
                     java.lang.String p_serverClass,
                     java.lang.String p_serverName,
                     java.lang.String p_service,
                     java.lang.String p_userId,
                     boolean p_uow,
                     java.lang.String p_uowTimeout,
                     int p_uowMaxLength)
This class encapsulates the ability to communicate with the Entire X Broker on the mainframe using the Entire X Java interface client.

Parameters:
p_brokerID - Broker Id ........ etb227:9999
p_serverClass - Server Class ..... WEBAPP
p_serverName - Server Name ...... UOW
p_service - Service .......... SERVER01
p_userId - User Id .......... blah
p_uow - UOW Request ...... true/false
p_uowTimeout - UOW Time Out ..... 90S (seconds) ... 2M (minutes)
p_uowMaxLength - UOW Max Length ... 10000
Method Detail

getBrokerId

public java.lang.String getBrokerId()
Returns the Broker Id.

Returns:
the broker Id.

getServerClass

public java.lang.String getServerClass()
Returns the Server Class.

Returns:
the server class.

getServerName

public java.lang.String getServerName()
Returns the Server Name.

Returns:
the server name.

getService

public java.lang.String getService()
Returns the Service.

Returns:
the service.

getUserId

public java.lang.String getUserId()
Returns the User Id.

Returns:
the user id.

isUOW

public boolean isUOW()
Returns if this broker instance is for a Unit Of Work. (default is false)

Returns:
true, if unit of work request; false, if non-unit of work request.

getUOWTimeout

public java.lang.String getUOWTimeout()
Returns the UOW Timeout. (default is 0)

Returns:
the uow timeout.

getUOWMaxLength

public int getUOWMaxLength()
Returns the UOW Max Recieve Length. (default is 2M)

Returns:
the uow max receive length.

getResponse

public java.lang.String getResponse()
Returns the response message received from our transmission.

Returns:
the response message.

sendMessage

public void sendMessage(java.lang.String p_message)
                 throws com.softwareag.entirex.aci.BrokerException
Sends a message to broker and waits for a return message response.

Parameters:
p_message - data to be sent to broker
Throws:
com.softwareag.entirex.aci.BrokerException