![JAR search and dependency download from the Maven repository](/logo.png)
org.objectweb.fractal.bf.ServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fractal-bf-examples-helloworld Show documentation
Show all versions of fractal-bf-examples-helloworld Show documentation
The BindingFactory HelloWorld example, with TCP and
Group bindings
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