|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
de.upb.swtpra.kernel.companycontrol.CompanyControlClientBase
de.upb.swtpra05.group03.companycontrol.CompanyControlClient
The Company Control Client. This Class inherits the ClientBase Class and is used for the Communication with the Server.
| Field Summary | |
static int |
clientPort
Client Port |
private int |
CompanyID
Die Company ID |
private static int |
CONNECTED
|
private CryptoMessagesHandler |
cryptoMsgHandler
this class encrypts all messages to the shuttles and decrypts all messages received from them |
private static int |
DISCONNECTED
|
private java.util.HashMap |
IDtoShuttleAgentID
map the two different kinds of IDs |
private java.util.HashMap |
IDtoStationName
Map to get the associated Name of a StationID Key : StationID (Integer) Value : Name (String) |
private java.util.HashMap |
KernelIDtoShuttleAgentID
Stores all received ShuttleAgentIDs |
private CompanyMainControl |
refMainControl
Reference to MainControl |
private static long |
serialVersionUID
Comment for serialVersionUID |
static int |
serverPort
Server Port |
static java.lang.String |
serverURL
the URL of the server |
static Settings |
settings
|
private java.util.Map |
shuttleList
|
private java.util.Map |
shuttleStockMap
Stores all Informations for the StockTable Key : StationID (Integer) Value : StockInformation (Class) |
private int |
state
|
private java.util.LinkedList |
WaitingStocks
|
| Fields inherited from class de.upb.swtpra.kernel.companycontrol.CompanyControlClientBase |
|
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
|
| Fields inherited from class java.rmi.server.RemoteServer |
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
CompanyControlClient(CompanyMainControl refMainControl)
|
|
| Method Summary | |
void |
connectionRefused()
The client can override this method in order to handle the case when a connection ist refused by the SimulationKernel. |
void |
disconnect()
|
private java.util.HashMap |
extractStationNames(de.upb.swtpra.kernel.TopologyData td)
Gathers all Station Names from the Topology |
de.upb.swtpra.kernel.id.ShuttleAgentID |
getShuttleAgentID(int ID)
|
private ShuttleInformation |
handleRemoteShuttleStatusString(de.upb.swtpra.kernel.visualisation.RemoteShuttleStatusString rsss)
|
void |
init(de.upb.swtpra.kernel.TopologyData td,
int time)
At the beginning the client gets the current topology. |
private void |
initialize()
Initialize the Client. |
void |
logon(java.lang.String Ip,
int Port,
java.lang.String Username,
java.lang.String Password)
|
void |
sendMessage(de.upb.swtpra.kernel.companycontrol.CompanyControlRemoteObj msg)
|
void |
update(de.upb.swtpra.kernel.visualisation.RemoteObj obj)
Update Method that handles incoming Messages. |
private void |
updateWaitingStocks()
Commits the StockInformations held back because not all Station Names have been gather at the time the Information was received in the update Method |
| Methods inherited from class de.upb.swtpra.kernel.companycontrol.CompanyControlClientBase |
abortConnection, connectToServer, disconnectFromServer, getKerntelToClientQueue, getQueue, getServer, isConnected, run, sendMessageToKernel |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
serialVersionUID
private static final int DISCONNECTED
private static final int CONNECTED
private int state
private java.util.Map shuttleStockMap
private java.util.Map shuttleList
private java.util.HashMap IDtoStationName
private java.util.HashMap KernelIDtoShuttleAgentID
private java.util.HashMap IDtoShuttleAgentID
public static java.lang.String serverURL
private java.util.LinkedList WaitingStocks
public static int clientPort
private CompanyMainControl refMainControl
public static int serverPort
public static final Settings settings
private int CompanyID
private CryptoMessagesHandler cryptoMsgHandler
| Constructor Detail |
public CompanyControlClient(CompanyMainControl refMainControl)
throws java.rmi.RemoteException
refMainControl -
java.rmi.RemoteException| Method Detail |
private void initialize()
public void connectionRefused()
de.upb.swtpra.kernel.companycontrol.CompanyControlClientBase
private java.util.HashMap extractStationNames(de.upb.swtpra.kernel.TopologyData td)
td -
private void updateWaitingStocks()
public void init(de.upb.swtpra.kernel.TopologyData td,
int time)
de.upb.swtpra.kernel.companycontrol.CompanyControlClientBase
td - The TopologyData object with the topology.time - The current simulation time.private ShuttleInformation handleRemoteShuttleStatusString(de.upb.swtpra.kernel.visualisation.RemoteShuttleStatusString rsss)
rsss -
public void update(de.upb.swtpra.kernel.visualisation.RemoteObj obj)
public void logon(java.lang.String Ip,
int Port,
java.lang.String Username,
java.lang.String Password)
Ip - Port - Username - Password - public void disconnect()
public de.upb.swtpra.kernel.id.ShuttleAgentID getShuttleAgentID(int ID)
ID -
public void sendMessage(de.upb.swtpra.kernel.companycontrol.CompanyControlRemoteObj msg)
msg -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||