|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LlpServerListener
The listener interface for receiving LlpServer
events. A
class that is interested in processing a LlpServer event must implement this
interface (and all the methods it contains). The listener object created from
that class is then registered with a LlpServer object using the LlpServer's
addListener
method. When the LlpServer's state
changes, the relevant method in the listener object is invoked. If you wish the
LlpServer object to stop receiving notifications, use the LlpServer's removeListener
method.
LlpServer
Method Summary | |
---|---|
void |
clientConnected(LlpConnection Client)
Fired when a connection is made to the server by a new client. |
void |
clientDisconnected(LlpConnection Client)
Fired when a client disconnects from the server, or a previous disconnect call on a Connection succeeds. |
void |
clientErrorReceived(LlpConnection Client,
java.lang.String ErrorMessage,
int ErrorCode)
Fired when a networking error occurs with a specific client connection. |
void |
dataIgnored(LlpConnection Client,
java.lang.String Data)
Fired when data has been received that is not within the header and trailer block envelope. |
void |
errorReceived(java.lang.String ErrorMessage,
int Code)
Fired when an issue occurs with the server socket itself rather than a specific client. |
void |
messageReceived(LlpConnection Client,
java.lang.String Message)
Fired each time we receive a message from a connected HL7 client. |
Method Detail |
---|
void errorReceived(java.lang.String ErrorMessage, int Code)
Fired when an issue occurs with the server socket itself rather than a specific client.
ErrorMessage
- A message describing the error.Code
- A code describing the error.void clientConnected(LlpConnection Client)
Fired when a connection is made to the server by a new client.
This event is useful for logging.
Client
- The client object that is connecting.void clientDisconnected(LlpConnection Client)
Fired when a client disconnects from the server, or a previous disconnect
call on a Connection succeeds.
This event is useful for logging.
Client
- The client object that is disconnecting.void clientErrorReceived(LlpConnection Client, java.lang.String ErrorMessage, int ErrorCode)
Fired when a networking error occurs with a specific client connection.
The context on when this is received is often determined by a previous operation, although that is not necessary. The connection will always be closed once this event is received so there is no need to close the connection within the application code.
Client
- The client that had an error.ErrorMessage
- The description of the error.ErrorCode
- The code that describes the error.void messageReceived(LlpConnection Client, java.lang.String Message)
Fired each time we receive a message from a connected HL7 client.
Typically, the message should be processed and only then should an HL7 ACKnowledgement message be sent.
Received without any Trailer or Header characters.
Client
- The client that has sent the message.Message
- The HL7 message (in string format) that has been sent.void dataIgnored(LlpConnection Client, java.lang.String Data)
Fired when data has been received that is not within the header and trailer block envelope.
This is for dealing with an incorrect LLP implementation. The data is provided to the user's application through this event. This allows it to be logged since this is likely to be a very significant error with the counterparty's LLP implementation.
Client
- The client that has sent the data.Data
- Data in string format that has been sent.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |