|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.concurrent.Service
ca.uhn.hl7v2.app.HL7Service
ca.uhn.hl7v2.app.TwoPortService
public class TwoPortService
A TCP/IP-based HL7 Service that uses separate ports for inbound and outbound messages. A connection is only activated when the same remote host connects to both the inbound and outbound ports.
| Field Summary |
|---|
| Fields inherited from class ca.uhn.hl7v2.app.HL7Service |
|---|
llp, parser |
| Constructor Summary | |
|---|---|
TwoPortService(int inboundPort,
int outboundPort)
|
|
TwoPortService(int inboundPort,
int outboundPort,
boolean tls)
|
|
TwoPortService(Parser parser,
LowerLayerProtocol llp,
int inboundPort,
int outboundPort,
boolean tls)
Creates a new instance of TwoPortService |
|
TwoPortService(Parser parser,
LowerLayerProtocol llp,
int inboundPort,
int outboundPort,
boolean tls,
ExecutorService executorService)
Creates a new instance of TwoPortService |
|
| Method Summary | |
|---|---|
protected void |
afterStartup()
Launches two threads that concurrently listen on the inboundPort and outboundPort. |
protected void |
afterTermination()
Terminate the two acceptor threads |
protected ca.uhn.hl7v2.app.AcceptorThread |
createAcceptThread(int port)
|
protected void |
handle()
Polls for accepted sockets |
static void |
main(String[] args)
Run server from command line. |
| Methods inherited from class ca.uhn.hl7v2.app.HL7Service |
|---|
getRemoteConnection, getRemoteConnections, keepRunning, loadApplicationsFromFile, newConnection, registerApplication, registerConnectionListener |
| Methods inherited from class ca.uhn.hl7v2.concurrent.Service |
|---|
getExecutorService, getServiceExitedWithException, isRunning, prepareTermination, run, setServiceExitedWithException, setShutdownTimeout, start, stop, stopAndWait, waitForTermination |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TwoPortService(int inboundPort,
int outboundPort)
public TwoPortService(int inboundPort,
int outboundPort,
boolean tls)
public TwoPortService(Parser parser,
LowerLayerProtocol llp,
int inboundPort,
int outboundPort,
boolean tls)
public TwoPortService(Parser parser,
LowerLayerProtocol llp,
int inboundPort,
int outboundPort,
boolean tls,
ExecutorService executorService)
| Method Detail |
|---|
protected void afterStartup()
afterStartup in class HL7ServiceHL7Service.afterStartup()protected void afterTermination()
afterTermination in class HL7ServiceHL7Service.afterTermination()protected void handle()
handle in class Service
protected ca.uhn.hl7v2.app.AcceptorThread createAcceptThread(int port)
throws SocketException,
IOException
SocketException
IOExceptionpublic static void main(String[] args)
super.loadApplicationsFromFile(...)). Uses the default
LowerLayerProtocol.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||