All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.fractal.fractaladl.examples.helloworld.2.5.source-code.ServerImpl Maven / Gradle / Ivy

Go to download

Fractal ADL is an extensible toolset for supporting heterogenous architecture descriptions.

There is a newer version: 2.6.1
Show newest version
/***
 * Fractal ADL Parser
 * Copyright (C) 2002-2004 France Telecom R&D
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: [email protected]
 *
 * Author: Eric Bruneton
 */

public class ServerImpl implements Service, ServiceAttributes {

  private String header = "";

  private int count = 0;

  public ServerImpl () {
    System.err.println("SERVER created");
  }
  
  public void print (final String msg) {
    new Exception() {
      public String toString () {
        return "Server: print method called";
      }
    }.printStackTrace();
    System.err.println("Server: begin printing...");
    for (int i = 0; i < count; ++i) {
      System.err.println(header + msg);
    }
    System.err.println("Server: print done.");
  }

  public String getHeader () {
    return header;
  }

  public void setHeader (final String header) {
    this.header = header;
  }

  public int getCount () {
    return count;
  }

  public void setCount (final int count) {
    this.count = count;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy