|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.protocol.impl.AbstractTransport
ca.uhn.hl7v2.protocol.impl.URLTransport
public class URLTransport
A TransportLayer that reads and writes from an URL (for example
over HTTP).
| Field Summary | |
|---|---|
protected int |
myBufferSize
|
static String |
URL_KEY
Key in Transportable metadata map under which URL is stored. |
| Constructor Summary | |
|---|---|
URLTransport(URL theURL,
boolean connectOnSend,
boolean connectOnReceive,
boolean connectOnConnect)
The boolean configuration flags determine when new connections are made. |
|
| Method Summary | |
|---|---|
void |
doConnect()
Calls openConnection() on the underlying URL and configures the connection, if this transport is configured to connect when connect() is called (see constructor params). |
void |
doDisconnect()
Performs disconnection as described in TransportLayer.disconnect(). |
Transportable |
doReceive()
Called by receive(), which then adds common metadata. |
void |
doSend(Transportable theMessage)
Writes the given message to the URL. |
String |
getContentType()
|
void |
setContentType(String theContentType)
|
| Methods inherited from class ca.uhn.hl7v2.protocol.impl.AbstractTransport |
|---|
connect, disconnect, getCommonMetadata, isConnected, receive, send |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ca.uhn.hl7v2.protocol.TransportLayer |
|---|
connect, disconnect, getCommonMetadata, isConnected, receive, send |
| Field Detail |
|---|
public static final String URL_KEY
protected int myBufferSize
| Constructor Detail |
|---|
public URLTransport(URL theURL,
boolean connectOnSend,
boolean connectOnReceive,
boolean connectOnConnect)
theURL - the URL at which messages are to be read and writtenconnectOnSend - makes a new connection before each sendconnectOnReceive - makes a new connection before each receiveconnectOnConnect - makes a new connection when connect() is called| Method Detail |
|---|
public void doSend(Transportable theMessage)
throws TransportException
doSend in class AbstractTransporttheMessage - the message to send
TransportExceptionca.uhn.hl7v2.protocol.AbstractTransport#doSend(ca.uhn.hl7v2.protocol.Transportable)
public Transportable doReceive()
throws TransportException
AbstractTransport
doReceive in class AbstractTransportTransportExceptionca.uhn.hl7v2.protocol.AbstractTransport#doReceive()
public void doConnect()
throws TransportException
doConnect in class AbstractTransportTransportExceptionca.uhn.hl7v2.protocol.AbstractTransport#doConnect()public String getContentType()
public void setContentType(String theContentType)
theContentType - the string to be used in the request property "Content-Type"
(defaults to "application/hl7+doc+xml")
public void doDisconnect()
throws TransportException
AbstractTransport
doDisconnect in class AbstractTransportTransportExceptionTransportLayer.disconnect()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||