|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.uhn.hl7v2.protocol.impl.DualTransportConnector
public class DualTransportConnector
A utility for connecting separate inbound and outbound
TransortLayers in a manner that avoids deadlock.
It is not safe to call connect() on two TransportLayer
in the same thread, because it blocks, and the remote system may be doing
the same thing, but in the opposite order. This class provides a method
that connects two layers in separate threads, and pends until they are
both connected.
| Constructor Summary | |
|---|---|
DualTransportConnector(TransportLayer theTransportA,
TransportLayer theTransportB)
|
|
| Method Summary | |
|---|---|
void |
cancelConnect()
Cancels a connect() in progress. |
void |
connect()
Connects both TransportLayers in separate threads,
and returns when both have been connected, or when cancelConnect()
is called. |
void |
disconnect()
|
TransportLayer |
getTransportA()
|
TransportLayer |
getTransportB()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DualTransportConnector(TransportLayer theTransportA,
TransportLayer theTransportB)
theTransportA - one TransportLayer we will want to connecttheTransportB - another one| Method Detail |
|---|
public TransportLayer getTransportA()
TransportLayers.public TransportLayer getTransportB()
TransportLayer.
public void connect()
throws TransportException
TransportLayers in separate threads,
and returns when both have been connected, or when cancelConnect()
is called.
TransportException
public void disconnect()
throws TransportException
TransportExceptionpublic void cancelConnect()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||