|
||||||||||
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 java.lang.String |
URL_KEY
Key in Transportable metadata map under which URL is stored. |
Constructor Summary | |
---|---|
URLTransport(java.net.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. |
java.lang.String |
getContentType()
|
void |
setContentType(java.lang.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 java.lang.String URL_KEY
protected int myBufferSize
Constructor Detail |
---|
public URLTransport(java.net.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 calledMethod Detail |
---|
public void doSend(Transportable theMessage) throws TransportException
doSend
in class AbstractTransport
theMessage
- the message to send
TransportException
ca.uhn.hl7v2.protocol.AbstractTransport#doSend(ca.uhn.hl7v2.protocol.Transportable)
public Transportable doReceive() throws TransportException
AbstractTransport
doReceive
in class AbstractTransport
TransportException
ca.uhn.hl7v2.protocol.AbstractTransport#doReceive()
public void doConnect() throws TransportException
doConnect
in class AbstractTransport
TransportException
ca.uhn.hl7v2.protocol.AbstractTransport#doConnect()
public java.lang.String getContentType()
public void setContentType(java.lang.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 AbstractTransport
TransportException
TransportLayer.disconnect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |