|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.app.ConnectionHub
public class ConnectionHub
Provides access to shared HL7 Connections. The ConnectionHub has at most one connection to any given address at any time.
Method Summary | |
---|---|
Connection |
attach(java.lang.String host,
int port,
Parser parser,
java.lang.Class<? extends LowerLayerProtocol> llpClass)
Returns a Connection to the given address, opening this Connection if necessary. |
void |
detach(Connection c)
Informs the ConnectionHub that you are done with the given Connection - if no other code is using it, it will be closed, so you should not attempt to use a Connection after detaching from it. |
void |
discard(Connection c)
Closes and discards the given Concection so that it can not be returned in subsequent calls to attach(). |
static ConnectionHub |
getInstance()
Returns the singleton instance of ConnectionHub |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ConnectionHub getInstance()
public Connection attach(java.lang.String host, int port, Parser parser, java.lang.Class<? extends LowerLayerProtocol> llpClass) throws HL7Exception
Connection.getParser()
.
HL7Exception
public void detach(Connection c)
public void discard(Connection c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |