Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP HL7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.tcpip.ext.server
Class TCPIPEXTServerApplicationImpl

    java.lang.Object
      com.stc.connector.tcpip.model.client.TCPIPClientApplicationImpl
          com.stc.connector.tcpip.ext.client.TCPIPEXTClientApplicationImpl
              com.stc.connector.tcpip.ext.server.TCPIPEXTServerApplicationImpl

All Implemented Interfaces:
  TCPIPEXTClientApplication, TCPIPEXTServerApplication, TCPIPClientApplication, TCPIPServerApplication

    public class TCPIPEXTServerApplicationImpl

extends TCPIPEXTClientApplicationImpl
implements TCPIPEXTServerApplication, TCPIPServerApplication

This class implements the extended TCPIP server application interface.

Version:
  cvs revision: $Revision: 1.11 $ Last Modified: $Date: 2008/03/18 06:03:30 $
Author:
  Harry Liu

Field Summary
`static java.lang.String` | `version`

Fields inherited from class com.stc.connector.tcpip.model.client.TCPIPClientApplicationImpl
`defaultTimeout, mMonitorData`

Constructor Summary
`TCPIPEXTServerApplicationImpl()` Default constructor for WSDL generation.
`TCPIPEXTServerApplicationImpl(TCPIPServerApplicationConnection serverAppConn, java.lang.String appName, TCPIPMonitorData aMonitorData)` Constructor for TCPIPEXTServerApplicationImpl.

Method Summary
`protected void` | `checkIfClosed()` Checks whether the application connection was closed.
`void` | `closeConnection()` Closes the existing connection physically (no matter it is good or bad).
`boolean` | `getDedicatedSessionMode()` Returns the dedicatedSessionMode.
`byte[]` | `getLeftOverFromLastRead()`
`int` | `getMaxDataSize()` Returns the maxDataSize.
`MessageInfoInterface` | `getMessageInfo()` Gets the message configuration information.
`javax.resource.spi.ResourceAdapter` | `getResourceAdapter()` Method getResourceAdapter.
`TCPIPServerApplicationConnection` | `getServerApplicationConnection()` Gets the TCPIP server application connection which created this instance of TCPIPServerApplication.
`TCPIPServerGeneralInfo` | `getServerGeneralInfo()` Returns the TCPIPServerGeneralInfo instance.
`TCPIPServerScheduleInfo` | `getServerScheduleInfo()` Returns the TCPIPServerScheduleInfo instance.
`TCPIPServerSocketInfo` | `getServerSocketInfo()` Returns the TCPIPServerSocketInfo instance.
`java.net.Socket` | `getSocket()` Returns the underlying java.net.Socket instance which the e*Way relys on.
`java.lang.String` | `getState()` Returns the State which is set by user.
`StateHandler` | `getStateHandler()` Returns the stateHandler.
`TCPIPServerConfigInfoInterface` | `getTCPIPInboundConfigInfo()` Returns an object that represents the base TCP/IP Inbound configuration information.
`boolean` | `isClosed()` Checks whether the connection is closed.
`boolean` | `isServerCloseNotification(java.lang.String closeCommand)` Returns true if the data which the server receives represents the close notification.
`void` | `setDedicatedSessionMode(boolean dedicatedSessionMode)` Sets the dedicatedSessionMode.
`void` | `setLeftOverFromLastRead(byte[] bs)`
`void` | `setMaxDataSize(int maxDataSize)` Sets the maxDataSize.
`void` | `setServerApplicationConnection(TCPIPServerApplicationConnection serverAppConn)` Sets the TCPIP application connection.
`void` | `setServerGeneralInfo(TCPIPServerGeneralInfo serverGeneralInfo)`
`void` | `setServerScheduleInfo(TCPIPServerScheduleInfo serverScheduleInfo)` Method setServerScheduleInfo.
`void` | `setServerSocketInfo(TCPIPServerSocketInfo serverSocketInfo)` Method setServerSocketInfo.
`void` | `setState(java.lang.String stateValue)` Sets State.
`void` | `setTCPIPInboundConfigInfo(TCPIPServerConfigInfo inboundConfigInfo)`
`void` | `updateMBeanProperty(java.lang.String propertyName, java.lang.String propertyDisplayValue)` Updates certain RA MBean property with the specified value.

Methods inherited from class com.stc.connector.tcpip.ext.client.TCPIPEXTClientApplicationImpl
`createBeginMarkerMsg, createEndMarkerMsg, createNumberMsg, createNumberMsg, readCertainLength, readFixedLengthMsg, readMsgBetweenMarkers, readMsgUntilMarker_old, readMsgUntilMarker, readRepeatingMsg, receiveAbstractMsg, receiveBeginEndMarkedMsg, receiveCustomEnvelopedMsg, receiveEndMarkedMsg, receiveEnvelopedMsg, receiveFixedLengthMsg, receiveLengthPrefixedMsg, receiveMarkedAndFixedMsg, receivePerActiveConnectionMsg, sendAbstractMsg, sendBeginEndMarkedMsg, sendCustomEnvelopedMsg, sendEndMarkedMsg, sendEnvelopedMsg, sendFixedLengthMsg, sendLengthPrefixedMsg, sendMarkedAndFixedMsg, sendPerActiveConnectionMsg, setMessageInfo`

Methods inherited from class com.stc.connector.tcpip.model.client.TCPIPClientApplicationImpl
`getApplicationConnection, getApplicationName, getCallingAdapter, getClientGeneralInfo, getMaxEmptyReadRetry, getMonitor, getSocketInfo, getTCPIPOutboundConfigInfo, getTimeToWaitForAResponse, isCalledByInbound, isServerCloseNotification, isServerIdleTimeout, readFully, readFully, receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString, setApplicationConnection, setApplicationName, setCalledByInbound, setCallingAdapter, setClientGeneralInfo, setSocketInfo, setTCPIPOutboundConfigInfo`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.stc.connector.appconn.tcpip.ext.TCPIPEXTServerApplication
`receiveBytes, receiveEnvelopedMsg, receiveString, receiveString, sendBytes, sendEnvelopedMsg, sendString, sendString`

Methods inherited from interface com.stc.connector.appconn.tcpip.model.TCPIPServerApplication
`receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString`

Methods inherited from interface com.stc.connector.appconn.tcpip.ext.TCPIPEXTClientApplication
`getTCPIPOutboundConfigInfo, receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString`

Methods inherited from interface com.stc.connector.appconn.tcpip.model.TCPIPClientApplication
`getTCPIPOutboundConfigInfo, receiveBytes, receiveString, receiveString, sendBytes, sendString, sendString`

Field Detail

### version

    public static final java.lang.String version

See Also:
  Constant Field Values

Constructor Detail

### TCPIPEXTServerApplicationImpl

    public TCPIPEXTServerApplicationImpl()

  Default constructor for WSDL generation.

### TCPIPEXTServerApplicationImpl

    public TCPIPEXTServerApplicationImpl(TCPIPServerApplicationConnection serverAppConn,
                                         java.lang.String appName,
                                         TCPIPMonitorData aMonitorData)

  Constructor for TCPIPEXTServerApplicationImpl.

  Parameters:
    `serverAppConn` - TCPIPServerApplicationConnection
    `appName` - The applicatin name.
    `aMonitorData` - The TCPIPMonitorData object

Method Detail

### isClosed

    public boolean isClosed()
                     throws TCPIPApplicationException

  Description copied from interface: `TCPIPClientApplication`
  Checks whether the connection is closed.

  Specified by:
    `isClosed` in interface `TCPIPEXTClientApplication`
  Specified by:
    `isClosed` in interface `TCPIPEXTServerApplication`
  Specified by:
    `isClosed` in interface `TCPIPClientApplication`
  Specified by:
    `isClosed` in interface `TCPIPServerApplication`
  Overrides:
    `isClosed` in class `TCPIPClientApplicationImpl`
  Returns:
    boolean Represents the status of the connection
  Throws:
    `TCPIPApplicationException` - on error
  See Also:
    `TCPIPClientApplication.isClosed()`

### closeConnection

    public void closeConnection()
                         throws TCPIPApplicationException

  Description copied from interface: `TCPIPClientApplication`
  Closes the existing connection physically (no matter it is good or bad). Once the connection is closed, any action over this connection will be invalid and will get exception.

  Specified by:
    `closeConnection` in interface `TCPIPEXTClientApplication`
  Specified by:
    `closeConnection` in interface `TCPIPEXTServerApplication`
  Specified by:
    `closeConnection` in interface `TCPIPClientApplication`
  Specified by:
    `closeConnection` in interface `TCPIPServerApplication`
  Overrides:
    `closeConnection` in class `TCPIPClientApplicationImpl`
  Throws:
    `TCPIPApplicationException` - on error
  See Also:
    `TCPIPClientApplication.closeConnection()`

### getMessageInfo

    public MessageInfoInterface getMessageInfo()
                                        throws TCPIPApplicationException,
                                               java.io.IOException

  Description copied from interface: `TCPIPEXTClientApplication`
  Gets the message configuration information. You can change the message configuration dynamically at runtime through the returned instance.

  Specified by:
    `getMessageInfo` in interface `TCPIPEXTClientApplication`
  Specified by:
    `getMessageInfo` in interface `TCPIPEXTServerApplication`
  Overrides:
    `getMessageInfo` in class `TCPIPEXTClientApplicationImpl`
  Returns:
    MessageInfo instance
  Throws:
    `TCPIPApplicationException` - on error
    `java.io.IOException` - on i/o error
  See Also:
    `TCPIPEXTClientApplication.getMessageInfo()`

### getSocket

    public java.net.Socket getSocket()
                              throws TCPIPApplicationException,
                                     java.io.IOException

  Description copied from interface: `TCPIPClientApplication`
  Returns the underlying java.net.Socket instance which the e*Way relys on. You can perform Socket operations through the returned Socket instance. Also, you can query/change some socket options dynamically at runtime through the corresponding getters/setters of the returned Socket instance. For more details, please refer the JDK javedoc on java.net.*.

  Specified by:
    `getSocket` in interface `TCPIPEXTClientApplication`
  Specified by:
    `getSocket` in interface `TCPIPEXTServerApplication`
  Specified by:
    `getSocket` in interface `TCPIPClientApplication`
  Specified by:
    `getSocket` in interface `TCPIPServerApplication`
  Overrides:
    `getSocket` in class `TCPIPClientApplicationImpl`
  Returns:
    Socket instance
  Throws:
    `TCPIPApplicationException` - on error
    `java.io.IOException` - on i/o error
  See Also:
    `TCPIPClientApplication.getSocket()`

### getTCPIPInboundConfigInfo

    public TCPIPServerConfigInfoInterface getTCPIPInboundConfigInfo()

  Description copied from interface: `TCPIPEXTServerApplication`
  Returns an object that represents the base TCP/IP Inbound configuration information.

  Parameters:
    None.

  Specified by:
    `getTCPIPInboundConfigInfo` in interface `TCPIPEXTServerApplication`
  Specified by:
    `getTCPIPInboundConfigInfo` in interface `TCPIPServerApplication`
  Returns:
    `TCPIPServerConfigInfo` - Object.
  Throws:
    None.
  See Also:
    `TCPIPServerApplication.getTCPIPInboundConfigInfo()`

### setTCPIPInboundConfigInfo

    public void setTCPIPInboundConfigInfo(TCPIPServerConfigInfo inboundConfigInfo)

  Parameters:
    `inboundConfigInfo` -

### getServerGeneralInfo

    public TCPIPServerGeneralInfo getServerGeneralInfo()

  Returns the TCPIPServerGeneralInfo instance.

  Returns:
    TCPIPServerGeneralInfo instance

### setServerGeneralInfo

    public void setServerGeneralInfo(TCPIPServerGeneralInfo serverGeneralInfo)

  Parameters:
    `serverGeneralInfo` -

### getServerSocketInfo

    public TCPIPServerSocketInfo getServerSocketInfo()

  Returns the TCPIPServerSocketInfo instance.

  Returns:
    TCPIPServerSocketInfo instance

### setServerSocketInfo

    public void setServerSocketInfo(TCPIPServerSocketInfo serverSocketInfo)

  Method setServerSocketInfo.

  Parameters:
    `serverSocketInfo` -

### getServerScheduleInfo

    public TCPIPServerScheduleInfo getServerScheduleInfo()

  Returns the TCPIPServerScheduleInfo instance.

  Returns:
    TCPIPServerScheduleInfo instance

### setServerScheduleInfo

    public void setServerScheduleInfo(TCPIPServerScheduleInfo serverScheduleInfo)

  Method setServerScheduleInfo.

  Parameters:
    `serverScheduleInfo` -

### checkIfClosed

    protected void checkIfClosed()
                          throws TCPIPApplicationException

  Description copied from class: `TCPIPClientApplicationImpl`
  Checks whether the application connection was closed. If closed then an TCPIPApplicationException is thrown.

  Overrides:
    `checkIfClosed` in class `TCPIPClientApplicationImpl`
  Throws:
    `TCPIPApplicationException` - if the Application Connection associated with this application was already closed.
  See Also:
    `TCPIPClientApplicationImpl.checkIfClosed()`

### getServerApplicationConnection

    public TCPIPServerApplicationConnection getServerApplicationConnection()

  Gets the TCPIP server application connection which created this instance of TCPIPServerApplication.

  Returns:
    TCPIPServerApplicationConnection instance.

### setServerApplicationConnection

    public void setServerApplicationConnection(TCPIPServerApplicationConnection serverAppConn)

  Sets the TCPIP application connection.

### getResourceAdapter

    public javax.resource.spi.ResourceAdapter getResourceAdapter()

  Description copied from class: `TCPIPClientApplicationImpl`
  Method getResourceAdapter.

  Overrides:
    `getResourceAdapter` in class `TCPIPClientApplicationImpl`
  Returns:
    ResourceAdapter
  See Also:
    `TCPIPClientApplicationImpl.getResourceAdapter()`

### getStateHandler

    public StateHandler getStateHandler()
                                 throws TCPIPApplicationException

  Description copied from class: `TCPIPClientApplicationImpl`
  Returns the stateHandler.

  Overrides:
    `getStateHandler` in class `TCPIPClientApplicationImpl`
  Returns:
    StateHandler
  Throws:
    `TCPIPApplicationException` - up on error
  See Also:
    `TCPIPClientApplicationImpl.getStateHandler()`

### getState

    public java.lang.String getState()
                              throws TCPIPApplicationException

  Description copied from interface: `TCPIPClientApplication`
  Returns the State which is set by user. User can use this state to keep track the progress of the business rules. This state has same life cycle as the resource adapter, that is, it is attached with the resource adapter. Once you set the state, its value will be kept during the whole life cycle of the resource adapter.

  Specified by:
    `getState` in interface `TCPIPEXTClientApplication`
  Specified by:
    `getState` in interface `TCPIPEXTServerApplication`
  Specified by:
    `getState` in interface `TCPIPClientApplication`
  Specified by:
    `getState` in interface `TCPIPServerApplication`
  Overrides:
    `getState` in class `TCPIPClientApplicationImpl`
  Returns:
    The state value.
  Throws:
    `TCPIPApplicationException` - on error
  See Also:
    `TCPIPClientApplication.getState()`

### setState

    public void setState(java.lang.String stateValue)
                  throws TCPIPApplicationException

  Description copied from interface: `TCPIPClientApplication`
  Sets State. User can use this state to keep track the progress of the business rules. This state has same life cycle as the resource adapter, that is, it is attached with the resource adapter. Once you set the state, its value will be kept during the whole life cycle of the resource adapter.

  Specified by:
    `setState` in interface `TCPIPEXTClientApplication`
  Specified by:
    `setState` in interface `TCPIPEXTServerApplication`
  Specified by:
    `setState` in interface `TCPIPClientApplication`
  Specified by:
    `setState` in interface `TCPIPServerApplication`
  Overrides:
    `setState` in class `TCPIPClientApplicationImpl`
  Parameters:
    `stateValue` - The state value to set
  Throws:
    `TCPIPApplicationException` - on error
  See Also:
    `com.stc.connector.appconn.tcpip.model.TCPIPClientApplication#setState()`

### getMaxDataSize

    public int getMaxDataSize()

  Description copied from interface: `TCPIPClientApplication`
  Returns the maxDataSize. This size defines the max size of data which the programs can hold internally. The valid range is from 1 to 2GB (the max value of java integer).

  Specified by:
    `getMaxDataSize` in interface `TCPIPEXTClientApplication`
  Specified by:
    `getMaxDataSize` in interface `TCPIPEXTServerApplication`
  Specified by:
    `getMaxDataSize` in interface `TCPIPClientApplication`
  Specified by:
    `getMaxDataSize` in interface `TCPIPServerApplication`
  Overrides:
    `getMaxDataSize` in class `TCPIPClientApplicationImpl`
  Returns:
    The max size of data that can be held.
  See Also:
    `TCPIPClientApplication.getMaxDataSize()`

### setMaxDataSize

    public void setMaxDataSize(int maxDataSize)
                        throws TCPIPApplicationException

  Description copied from interface: `TCPIPClientApplication`
  Sets the maxDataSize. This size defines the max size of data which the programs can hold internally. The valid range is from 1 to 2GB (the max value of java integer).

  Specified by:
    `setMaxDataSize` in interface `TCPIPEXTClientApplication`
  Specified by:
    `setMaxDataSize` in interface `TCPIPEXTServerApplication`
  Specified by:
    `setMaxDataSize` in interface `TCPIPClientApplication`
  Specified by:
    `setMaxDataSize` in interface `TCPIPServerApplication`
  Overrides:
    `setMaxDataSize` in class `TCPIPClientApplicationImpl`
  Parameters:
    `maxDataSize` - The maxDataSize to set
  Throws:
    `TCPIPApplicationException` - on error
  See Also:
    `TCPIPClientApplication.setMaxDataSize(int)`

### getDedicatedSessionMode

    public boolean getDedicatedSessionMode()

  Description copied from interface: `TCPIPEXTServerApplication`
  Returns the dedicatedSessionMode. The dedicatedSessionMode means that the server socket (on some port) may serve a single client request (the first one connected) at the same time. See the eWay documentation for detail.

  Parameters:
    None.

  Specified by:
    `getDedicatedSessionMode` in interface `TCPIPEXTServerApplication`
  Specified by:
    `getDedicatedSessionMode` in interface `TCPIPServerApplication`
  Returns:
    `Boolean` - Returns true or false.
  Throws:
    None.
  See Also:
    `TCPIPServerApplication.getDedicatedSessionMode()`

### setDedicatedSessionMode

    public void setDedicatedSessionMode(boolean dedicatedSessionMode)

  Description copied from interface: `TCPIPEXTServerApplication`
  Sets the dedicatedSessionMode. The dedicatedSessionMode means that the server socket (on some port) may serve a single client request (the first one connected) at the same time. See the eWay documentation for detail.

  Specified by:
    `setDedicatedSessionMode` in interface `TCPIPEXTServerApplication`
  Specified by:
    `setDedicatedSessionMode` in interface `TCPIPServerApplication`
  Parameters:
    `dedicatedSessionMode` - The dedicatedSessionMode to set.
  See Also:
    `TCPIPServerApplication.setDedicatedSessionMode(boolean)`

### isServerCloseNotification

    public boolean isServerCloseNotification(java.lang.String closeCommand)
                                      throws TCPIPApplicationException

  Description copied from class: `TCPIPClientApplicationImpl`
  Returns true if the data which the server receives represents the close notification.

  Overrides:
    `isServerCloseNotification` in class `TCPIPClientApplicationImpl`
  Returns:
  Throws:
    `TCPIPApplicationException`
  See Also:
    `TCPIPClientApplicationImpl.isServerCloseNotification(String)`

### getLeftOverFromLastRead

    public byte[] getLeftOverFromLastRead()

  Overrides:
    `getLeftOverFromLastRead` in class `TCPIPClientApplicationImpl`
  Returns:
  See Also:
    `TCPIPClientApplicationImpl.getLeftOverFromLastRead()`

### setLeftOverFromLastRead

    public void setLeftOverFromLastRead(byte[] bs)

  Overrides:
    `setLeftOverFromLastRead` in class `TCPIPClientApplicationImpl`
  See Also:
    `TCPIPClientApplicationImpl.setLeftOverFromLastRead(byte[])`

### updateMBeanProperty

    public void updateMBeanProperty(java.lang.String propertyName,
                                    java.lang.String propertyDisplayValue)

  Description copied from class: `TCPIPClientApplicationImpl`
  Updates certain RA MBean property with the specified value.

  Overrides:
    `updateMBeanProperty` in class `TCPIPClientApplicationImpl`
  See Also:
    `TCPIPClientApplicationImpl.updateMBeanProperty(java.lang.String, java.lang.String)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP HL7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD