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.message.acknak
Class AckNakMsg

    java.lang.Object
      com.stc.connector.message.acknak.AckNakMsg

All Implemented Interfaces:
  AbstractMsg

Direct Known Subclasses:
  AckMsg, NakMsg

    public abstract class AckNakMsg

extends java.lang.Object
implements AbstractMsg

This class represents an abstract Ack/Nak message.

Version:
  cvs revision: $Revision: 1.4 $ Last Modified: $Date: 2005/09/03 06:30:02 $
Author:
  Harry Liu

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

Constructor Summary
`AckNakMsg(AbstractMsg msg)` Constructor.

Method Summary
`boolean` | `equalsTo(AbstractMsg msg)` Checks whether the Ack/Nak message equals to the specified AbstractMsg.
`byte[]` | `getBytes()` Returns a byte array.
`AbstractMsg` | `getMessage()` Returns the message.
`java.lang.String` | `getType()` Gets the Type.
`void` | `setMessage(AbstractMsg message)` Sets the message.
`protected void` | `setType(java.lang.String type)` Sets the type.

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

Field Detail

### version

    public static final java.lang.String version

See Also:
  Constant Field Values

### TYPE_ACK

    public static final java.lang.String TYPE_ACK

  TYPE_ACK

  See Also:
    Constant Field Values

### TYPE_NAK

    public static final java.lang.String TYPE_NAK

  TYPE_NAK

  See Also:
    Constant Field Values

Constructor Detail

### AckNakMsg

    public AckNakMsg(AbstractMsg msg)

  Constructor.

  Parameters:
    `msg` - AbstractMsg

Method Detail

### getType

    public java.lang.String getType()

  Gets the Type.

  Returns:
    the Type.

### setType

    protected void setType(java.lang.String type)

  Sets the type.

  Parameters:
    `type` - The type to set

### getMessage

    public AbstractMsg getMessage()

  Returns the message.

  Returns:
    AbstractMsg instance

### setMessage

    public void setMessage(AbstractMsg message)

  Sets the message.

  Parameters:
    `message` - The message to set

### getBytes

    public byte[] getBytes()
                    throws java.io.IOException

  Description copied from interface: `AbstractMsg`
  Returns a byte array. This is the method that all kinds of messages need to implement.

  Specified by:
    `getBytes` in interface `AbstractMsg`
  Returns:
    A byte array
  Throws:
    `java.io.IOException` - on error
  See Also:
    `AbstractMsg.getBytes()`

### equalsTo

    public boolean equalsTo(AbstractMsg msg)

  Checks whether the Ack/Nak message equals to the specified AbstractMsg.

  Parameters:
    `msg` - The AbstractMsg to compare.
  Returns:
    boolean

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