?? helloworldimpl.java
字號:
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package masteringrmi.hellojini.server;
import java.rmi.Remote;
import java.rmi.MarshalledObject;
import java.rmi.RemoteException;
import java.rmi.ServerException;
import java.util.Properties;
import masteringrmi.hellojini.interfaces.HelloWorld;
/**
* This is a remote object that implements the remote interface.
* This is the Jini service we want to provide
*
* @see HelloWorld
* @author Rickard 謆erg (rickard@dreambean.com)
* @version 1.0
*/
public class HelloWorldImpl
implements HelloWorld
{
// Attributes ----------------------------------------------------
private int counter = 0; // Invocation counter
// HelloWorld implementation -------------------------------------
/**
* Create a greeting.
*
* @param name a name
* @return a name a greeting including the name and the nr of invocations
*/
public String helloWorld(String name)
{
System.out.println("Hello called");
return "Hello " + name +"! You are caller nr "+(++counter);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -