package rmicc;
import java.awt.Toolkit;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.Dimension;
import java.util.*;
import java.io.*;
/**
* <p>Title: Server </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Server extends java.rmi.server.UnicastRemoteObject implements IntServer{
boolean packFrame = false;
String message = new String();
String time = new String();
Calendar cal = Calendar.getInstance();
ArrayList Users = new ArrayList();
ArrayList UserNames = new ArrayList();
String ErrorLog = new String();
String RegLog = new String();
String ChatLog = new String();
String WhisperLog = new String();
/**
* Construct and show the application.
*/
public Server() throws java.rmi.RemoteException{
Frame1 frame = new Frame1();
if (packFrame) {
frame.pack();
}
else {
frame.validate();
}
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation( (screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
try {
jbInit();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
public void setClientMessage(String Sender, String User, String clientMessage, int S)
throws java.rmi.RemoteException
{
//code omitted
}
public void setServerMessage(String User, int State, String note)
throws java.rmi.RemoteException
{
//code omitted
}
public void setClient(ClientInt c, int flag)
throws java.rmi.RemoteException
{
//code omitted
}
public void register(String Username)
throws java.rmi.RemoteException
{
//code omitted
}
public void unregister(String User)
throws java.rmi.RemoteException
{
//code omitted
}
public void Broadcast(String message)
{
//code omitted
}
public String EncryptDecrypt(String message)
{
//code omitted
}
public void XML(String LogName, String Tag, int Level, int Stage, String nodeData){
//code omitted
}
public void Unicast(int Type,String Sender,String User, int State, String note)
{
//code omitted
}
/*Application entry point.
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception exception) {
exception.printStackTrace();
}
// new Server();
}
});
}
private void jbInit() throws Exception {
}
}