public class TestPanel extends JPanel implements ConnectionListener
A user interface for testing communications with an HL7 server. The UI contains a window with 4 main panels. One can enter message text into the first panel, press a "parse" button so that the message is displayed in a tree in the second panel, press "send" to send the message to a remote server and display the response in a tree in the third panel, and press "encode" to write the inbound message as text in the fourth panel. To use, run from the command line with no arguments, like this:
java -classpath . ca.uhn.hl7v2.app.TestPanel
Exceptions generated during parsing or server communication are logged in the working directory and displayed in a dialog box.
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
TestPanel()
Deprecated.
Creates a new instance of TestPanel
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(ca.uhn.hl7v2.app.ConnectionData cf)
Deprecated.
Sets up a connection to a remote server that uses the minimal lower layer
protocol, and this TestPanel's GenericParser.
|
void |
connect(String host,
int port)
Deprecated.
Sets up a connection to a remote server that uses the minimal lower layer
protocol, and this TestPanel's GenericParser.
|
void |
connect(String host,
int port,
boolean tls)
Deprecated.
Sets up a connection to a remote server that uses the minimal lower layer
protocol, and this TestPanel's GenericParser.
|
void |
connect(String host,
int inboundPort,
int outboundPort)
Deprecated.
Sets up a connection to a remote server that uses the minimal lower layer
protocol, and this TestPanel's GenericParser.
|
void |
connect(String host,
int inboundPort,
int outboundPort,
boolean tls)
Deprecated.
Sets up a connection to a remote server that uses the minimal lower layer
protocol, and this TestPanel's GenericParser.
|
void |
connectionDiscarded(Connection connection)
Deprecated.
Notifies the listener that a new connection is closed and is being discarded.
|
void |
connectionReceived(Connection connection)
Deprecated.
Notification that a new Connection has arrived at an HL7Service.
|
void |
encodeInbound()
Deprecated.
Encodes the message that is currently displayed in the tree into a
traditionally encoded message string and displays in the inbound message
text box.
|
void |
encodeOutbound()
Deprecated.
Encodes the message that is currently displayed in the outbound tree into
a traditionally encoded message string and displays in a new window.
|
protected Parser |
getParser()
Deprecated.
Returns this TestPanel's underlying GenericParser.
|
MessageTypeRouter |
getRouter()
Deprecated.
Returns the MessageTypeRouter associated with this TestPanel.
|
static void |
main(String[] args)
Deprecated.
|
static void |
openTextWindow(String title,
String text)
Deprecated.
Opens a new window for displaying text (intended for displaying encoded
messages.
|
void |
parseOutbound()
Deprecated.
Attempts to parse the contents of the outbound message text box into a
message object and display in the outbound message tree.
|
void |
sendAndRecieve()
Deprecated.
Sends the message that is currently displayed in the outbound tree to the
remote system that is currently connected.
|
void |
showException(Exception e)
Deprecated.
Displays an exception in a standard way.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic TestPanel() throws HL7Exception
HL7Exceptionprotected Parser getParser()
public void showException(Exception e)
public void parseOutbound() throws HL7Exception, EncodingNotSupportedException
public void connect(String host, int port) throws Exception
Exceptionpublic void connect(String host, int port, boolean tls) throws Exception
Exceptionpublic void connect(String host, int inboundPort, int outboundPort) throws Exception
Exceptionpublic void connect(String host, int inboundPort, int outboundPort, boolean tls) throws Exception
Exceptionpublic void connect(ca.uhn.hl7v2.app.ConnectionData cf) throws Exception
Exceptionpublic void connectionReceived(Connection connection)
connectionReceived in interface ConnectionListenerpublic void connectionDiscarded(Connection connection)
ConnectionListenerconnectionDiscarded in interface ConnectionListenerpublic MessageTypeRouter getRouter()
public void sendAndRecieve() throws Exception
Exceptionpublic void encodeInbound() throws HL7Exception
HL7Exceptionpublic void encodeOutbound() throws HL7Exception
HL7Exceptionpublic static void openTextWindow(String title, String text)
Copyright © 2001-2012 University Health Network. All Rights Reserved.