: Class Comms

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## PollManager
Class Comms

    java.lang.Object
      |
      +--PollManager.Comms

public class Comms
extends java.lang.Object

Comms is the key class for launching communications with servers. The class launches a thread for TCP/IP communications and also contains the methods for building packets. These packets are then held in `message` for retrieval by `TCPClient`

Version:
  1.0 8 September 2001
Author:
  Jason Kitcat

Field Summary
`protected static java.lang.String` | `ER_address` constant to hold address of electoral roll server
`protected static java.lang.String` | `er_public_key` public and private keys for communications
`protected static int` | `freePort` constant to store value being used as GNU.FREE port number For security reasons I recommend this is changed regularly
`protected static java.lang.String` | `pm_private_key`
`protected TimeOutThread` | `timer`

Constructor Summary
`protected` | `Comms()`

Method Summary
`protected java.util.Date` | `getCheck()`
`protected java.lang.String` | `getClient_hmac_key()`
`protected java.lang.String` | `getClient_hmac_seed()`
`protected java.lang.String` | `getMessage_two()`
`protected java.lang.String` | `getMessage()`
`protected int` | `getSequence_number()`
`protected java.lang.String` | `getServer_hmac_key()`
`protected java.lang.String` | `getServer_hmac_seed()`
`protected java.lang.String` | `getsession_key()`
`protected char` | `getType()`
`protected void` | `noCheck()`
`protected void` | `sendDiag(java.lang.String msg)` sendDiag dispatches any diagnostic packets for debugging.
`protected void` | `sendPMCheck(java.lang.String name, java.lang.String code, java.lang.String passw)` sendPMCheck dispatches a packet to the ERServer for voter authentication.
`protected void` | `sendPMVoted(java.lang.String name, java.lang.String code, java.lang.String password)` sendPMVoted creates check date for security and sends a voted packet.
`protected void` | `setClient_hmac_key(java.lang.String x)`
`protected void` | `setFromServer(java.lang.String x)`
`protected void` | `setSequence_number(int x)`
`protected void` | `setServer_hmac_key(java.lang.String x)`
`protected void` | `setServer_hmac_seed(java.lang.String x)`
`protected void` | `setsession_key(java.lang.String x)`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### timer

    protected TimeOutThread timer

### ER_address

    protected static final java.lang.String ER_address

  constant to hold address of electoral roll server

### freePort

    protected static final int freePort

  constant to store value being used as GNU.FREE port number For security reasons I recommend this is changed regularly

### er_public_key

    protected static final java.lang.String er_public_key

  public and private keys for communications

### pm_private_key

    protected static final java.lang.String pm_private_key

Constructor Detail

### Comms

    protected Comms()

Method Detail

### setFromServer

    protected void setFromServer(java.lang.String x)

### getCheck

    protected java.util.Date getCheck()

### noCheck

    protected void noCheck()

### getsession_key

    protected java.lang.String getsession_key()

### setsession_key

    protected void setsession_key(java.lang.String x)

### getMessage

    protected java.lang.String getMessage()

### getMessage_two

    protected java.lang.String getMessage_two()

### getType

    protected char getType()

### getServer_hmac_key

    protected java.lang.String getServer_hmac_key()

### setServer_hmac_key

    protected void setServer_hmac_key(java.lang.String x)

### getClient_hmac_key

    protected java.lang.String getClient_hmac_key()

### setClient_hmac_key

    protected void setClient_hmac_key(java.lang.String x)

### getClient_hmac_seed

    protected java.lang.String getClient_hmac_seed()

### getServer_hmac_seed

    protected java.lang.String getServer_hmac_seed()

### setServer_hmac_seed

    protected void setServer_hmac_seed(java.lang.String x)

### getSequence_number

    protected int getSequence_number()

### setSequence_number

    protected void setSequence_number(int x)

### sendPMCheck

    protected void sendPMCheck(java.lang.String name,
                               java.lang.String code,
                               java.lang.String passw)

  sendPMCheck dispatches a packet to the ERServer for voter authentication. Since 1.5 the PIN and password have been sent as digests.
  Parameters:
    `name` - Name of user
    `code` - A unique code for this election only
    `passw` - Self explanatory

### sendPMVoted

    protected void sendPMVoted(java.lang.String name,
                               java.lang.String code,
                               java.lang.String password)

  sendPMVoted creates check date for security and sends a voted packet.
  Parameters:
    `name` - Name of user
    `code` - A unique code for this election only
    `password` - Self explanatory

### sendDiag

    protected void sendDiag(java.lang.String msg)

  sendDiag dispatches any diagnostic packets for debugging.
  Parameters:
    `msg` - Data for packet

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD