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

org.objectweb.fractal.bf.ServiceImpl Maven / Gradle / Ivy

There is a newer version: 0.5
Show newest version
package org.objectweb.fractal.bf;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.Properties;

/**
 * A simple implementation of the {@link Service} interface.
 * 
 * @author [email protected]
 * 
 */
public class ServiceImpl implements Service, Serializable {
	/**
	 * Print a nice message.
	 */
	public void print() throws RemoteException {

		System.out.println("Hello BindingFactory");

	}

	/**
	 * Return a nice message.
	 */
	public String printAndAnswer() throws RemoteException {

		return "Message received from the Service component";
	}

	/**
	 * @see org.objectweb.fractal.bf.Service#getBytes(java.util.Properties,
	 *      byte[])
	 */
	public byte[] getBytes(Properties p, byte[] b) throws RemoteException {
		System.out.println("ServiceImpl received properties: " + p
				+ " and bytes:" + b);
		return b;
	}

	/**
	 * @see org.objectweb.fractal.bf.Service#badMethod()
	 */
	public void badMethod() throws HelloWorldException {
		throw new HelloWorldException();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy