Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.lucane.client
Class Communicator  view Communicator download Communicator.java

java.lang.Object
  extended byorg.lucane.client.Communicator

public class Communicator
extends java.lang.Object

Allows communication with the server and the other clients Used to ask connections informations and to download plugins.


Field Summary
private  org.lucane.common.ConnectInfo ci_proxy
           
private  org.lucane.common.ConnectInfo ci_server
           
private  java.util.Vector infos
           
private static Communicator instance
           
private  Client parent
           
private  org.lucane.common.signature.Signer signer
           
 
Constructor Summary
protected Communicator(java.lang.String server_name)
          Constructor.
 
Method Summary
protected  void downloadPlugin(java.lang.String name)
          Download a new Plugin or a new version from the server
 java.util.Vector getAllConnectInfos()
          Get the connections informations on all known clients
 org.lucane.common.ConnectInfo getConnectInfo(java.lang.String username)
          Get a ConnectInfo from the server or from the local cache if it has already been fetched.
static Communicator getInstance()
          Get the signleton instance
 java.util.Vector getUserList()
          Fetch the user list from the server
 org.lucane.common.ObjectConnection sendMessageTo(org.lucane.common.ConnectInfo who, java.lang.String dest, java.lang.Object data)
          Send a message to the target with the correct parameters and following the protocol correctly.
protected  void setPrivateKey(java.lang.String key, java.lang.String passwd)
          Set the private key to use to sign the messages
protected  void setProxyInfo()
          Set the user connection informations to the proxy if necessary
protected  int updatePlugins()
          Update the plugins from the server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ci_server

private org.lucane.common.ConnectInfo ci_server

ci_proxy

private org.lucane.common.ConnectInfo ci_proxy

infos

private java.util.Vector infos

parent

private Client parent

signer

private org.lucane.common.signature.Signer signer

instance

private static Communicator instance
Constructor Detail

Communicator

protected Communicator(java.lang.String server_name)
Constructor.

Method Detail

getInstance

public static Communicator getInstance()
Get the signleton instance


updatePlugins

protected int updatePlugins()
Update the plugins from the server


downloadPlugin

protected void downloadPlugin(java.lang.String name)
Download a new Plugin or a new version from the server


setProxyInfo

protected void setProxyInfo()
Set the user connection informations to the proxy if necessary


getAllConnectInfos

public java.util.Vector getAllConnectInfos()
Get the connections informations on all known clients


getConnectInfo

public org.lucane.common.ConnectInfo getConnectInfo(java.lang.String username)
Get a ConnectInfo from the server or from the local cache if it has already been fetched.


setPrivateKey

protected void setPrivateKey(java.lang.String key,
                             java.lang.String passwd)
Set the private key to use to sign the messages


sendMessageTo

public org.lucane.common.ObjectConnection sendMessageTo(org.lucane.common.ConnectInfo who,
                                                        java.lang.String dest,
                                                        java.lang.Object data)
Send a message to the target with the correct parameters and following the protocol correctly.


getUserList

public java.util.Vector getUserList()
Fetch the user list from the server