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

.fractal.fractaladl.examples.helloworld.2.5.source-code.ClientImpl 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
 */

import org.objectweb.fractal.api.control.BindingController;

public class ClientImpl implements Runnable, BindingController {

  private Service service;

  public ClientImpl () {
    System.err.println("CLIENT created");
  }
  
  public void run () {
    service.print("hello world");
  }

  public String[] listFc () {
    return new String[] { "s" };
  }

  public Object lookupFc (final String cItf) {
    if (cItf.equals("s")) {
      return service;
    }
    return null;
  }

  public void bindFc (final String cItf, final Object sItf) {
    if (cItf.equals("s")) {
      service = (Service)sItf;
    }
  }

  public void unbindFc (final String cItf) {
    if (cItf.equals("s")) {
      service = null;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy