com.ls.lars.communication
Interface IRMIConnector

All Superinterfaces:
Remote
All Known Implementing Classes:
RMIConnector

public interface IRMIConnector
extends Remote

Remote interface for the RMIConnector. The defined methods will be be called remote from the remote agent to send and receive messages.

Version:
$Revision: 1.5 $
Author:
Last modified by $Author: MHeitz $
See Also:
RMIConnector

Method Summary
 void closeConnection()
          closes the remote connection that the remote object can unbind itself from rmi registry
 void pushMessageToRemoteSide(Message message)
          sends a message to the remote side
 void securityCheck(String clientIpAddress, String clientAgentName)
          checks the permission to connect for the specified agent from the given IP address
 void setCallbackReference(IRMIConnector reference)
          saves the object reference of the RMI client for callback function for the RMI server
 void verifyConnectionStatus()
          This method will be called by the 'remote' side in order to verify the current connection status Note: This method shall return nothing, as the success of this method depends on the fact whether or not the caller catches a RemoteException.
 

Method Detail

securityCheck

public void securityCheck(String clientIpAddress,
                          String clientAgentName)
                   throws ConnectionException,
                          RemoteException
checks the permission to connect for the specified agent from the given IP address
Parameters:
clientIpAddress - ip address of the agent
clientAgentName - name of the agent
Throws:
RemoteException - if remote method invocation fails
ConnectionException - if the security check results in forbidding the connection

setCallbackReference

public void setCallbackReference(IRMIConnector reference)
                          throws RemoteException
saves the object reference of the RMI client for callback function for the RMI server
Parameters:
reference - object referenz to be saved
Throws:
RemoteException - if remote method invocation fails

pushMessageToRemoteSide

public void pushMessageToRemoteSide(Message message)
                             throws RemoteException
sends a message to the remote side
Parameters:
message - message to be sent
Throws:
RemoteException - if remote method invocation fails

closeConnection

public void closeConnection()
                     throws RemoteException
closes the remote connection that the remote object can unbind itself from rmi registry
Throws:
RemoteException - if remote method invocation fails

verifyConnectionStatus

public void verifyConnectionStatus()
                            throws RemoteException
This method will be called by the 'remote' side in order to verify the current connection status Note: This method shall return nothing, as the success of this method depends on the fact whether or not the caller catches a RemoteException.
Throws:
RemoteException - if the verification of the conection fails