i'm trying to figure out how to get the rmi server to tell me the host address of the client thats using it, for reporting & security purposes.
the java.rmi.server.RemoteServer class has a method called .getClientHost()
but all my code is in an implimentation class which uses a custom interface which extends the java.rmi.Remote interface, which is somehow linked to the java.rmi.server.UnicastRemoteObject which extends the java.rmi.RemoteServer class which is the one i'm wanting to call the method from.
so i'm sure you can see my confusion
this is my interface so far:
but i dont think the rest of the code is particularly relevant, i'll add it if anyone thinks it'll help though.
so any ideas how i can figure out the clients host?
the java.rmi.server.RemoteServer class has a method called .getClientHost()
but all my code is in an implimentation class which uses a custom interface which extends the java.rmi.Remote interface, which is somehow linked to the java.rmi.server.UnicastRemoteObject which extends the java.rmi.RemoteServer class which is the one i'm wanting to call the method from.
so i'm sure you can see my confusion
this is my interface so far:
Code:
import java.rmi.*;
public interface FileService extends Remote{
public Listing listFiles() throws RemoteException;
public byte[] getFile(String filename) throws RemoteException;
public boolean uploadFile(byte[] filedata, String filename) throws RemoteException;
public boolean renameFile(String oldname, String newname) throws RemoteException;
}
but i dont think the rest of the code is particularly relevant, i'll add it if anyone thinks it'll help though.
so any ideas how i can figure out the clients host?