Package ca.uhn.hl7v2.app
Class LazyConnection
java.lang.Object
ca.uhn.hl7v2.app.LazyConnection
- All Implemented Interfaces:
Connection,Closeable,AutoCloseable
A LazyConnection behaves like an ordinary connection except for the fact
that the actual socket connection is created lazily right before the
first message is sent over the associated Initiator. Server-side connections
are always non-lazy.
-
Constructor Summary
ConstructorsConstructorDescriptionLazyConnection(ca.uhn.hl7v2.app.ConnectionData data, ExecutorService executor) -
Method Summary
-
Constructor Details
-
LazyConnection
-
-
Method Details
-
activate
Description copied from interface:ConnectionActivate this connection- Specified by:
activatein interfaceConnection
-
getInitiator
Description copied from interface:ConnectionReturns an Initiator instance- Specified by:
getInitiatorin interfaceConnection- Returns:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
isOpen
Description copied from interface:ConnectionReturns true if this connection is open- Specified by:
isOpenin interfaceConnection- Returns:
- true if this connection is open
-
getExecutorService
- Specified by:
getExecutorServicein interfaceConnection
-
getRemoteAddress
Description copied from interface:ConnectionReturns the address on the remote end of this connection. Note that in the case of aLazyConnectionthis method may returnnull.- Specified by:
getRemoteAddressin interfaceConnection- See Also:
-
getRemotePort
Description copied from interface:ConnectionReturns the port on the remote end of this connection. Note that in the case of aLazyConnectionthis method may returnnull.- Specified by:
getRemotePortin interfaceConnection- See Also:
-