Package de.tfh.pdvl.hp.connections

Examples of de.tfh.pdvl.hp.connections.ClientConnection


     * @return ClientConnection to the serialServer
     * @throws WebAppException
     */
    private ClientConnection connectToServer() throws WebAppException {
        try {
            ClientConnection conn = new ClientConnection(
                    WebAppProperties.getInstance().getServerHost(),
                    WebAppProperties.getInstance().getTcpPort());
            return conn;
        }
        catch(UnknownHostException uhe) {
View Full Code Here


 
  /**
   * QueryMessage is sent to the serialServer.
   */
  public void visit(QueryMessage m) throws WebAppException {
      ClientConnection conn = connectToServer();
      conn.write(m.toString());
    try {
            Message retMessage = parser.parse(conn.read());
            retMessage.accept(this);
        } catch (MessageParserException e) {
            throw new WebAppException("Invalid message", e);
        } catch (IOException e) {
            throw new WebAppException("Connection to serialServer failed", e);
View Full Code Here

  /**
   * Writes the SetMessage to the network and waits for response.
   * @throws ParentException
   */
  public void visit(SetMessage m) throws ParentException  {
      ClientConnection conn = connectToServer();
      conn.write(m.toString());
   
    Message retMessage;
    try {
      retMessage = parser.parse(conn.read());
      retMessage.accept(this);
   
    } catch (MessageParserException e) {
        throw new WebAppException("Invalid message", e);
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of de.tfh.pdvl.hp.connections.ClientConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.