P2PConstants
Keywords: uk.ac.ic.doc.automed.p2p.protocol.P2PConstants class

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

## uk.ac.ic.doc.automed.p2p.protocol
Class P2PConstants

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.protocol.P2PConstants

    public class P2PConstants

extends java.lang.Object

This class supplies the names of various fields and tables used in the AutoMed system, plus "psuedo constants" readin from the P2P configuration file

Field Summary
`static java.lang.String` | `ADDRESS`
`static java.lang.String` | `ADVERTISE`
`static java.lang.String` | `ANY`
`static java.lang.String` | `ASK`
`static java.lang.String` | `AUTOMED_OBJECTS`
`static java.lang.String` | `BROKER_ALL`
`static java.lang.String` | `COMMENT` Comment string in configuration files
`static java.lang.String` | `CONFIRM`
`static java.lang.String` | `CONSTRAINTS`
`static java.lang.String` | `CONTENT`
`static java.lang.String` | `CONTEXT`
`static boolean` | `debug`
`static java.lang.String` | `DESCRIPTION`
`static java.lang.String` | `DIRECTORY_SERVER_CFG_FILE`
`static java.lang.String` | `ERROR`
`static java.lang.String` | `EXISTING_PEER`
`static java.lang.String` | `FAIL`
`static java.lang.String` | `FROM_SCHEMA`
`static java.lang.String` | `KEEP_ALIVE` Context: keep alive (udp)
`static java.lang.String` | `LAST_UPDATE`
`static java.lang.String` | `LIST`
`static java.lang.String` | `MESSAGE_BODY_DELIMITER`
`static java.lang.String` | `MESSAGE_DELIMITER`
`static java.lang.String` | `METADATA`
`static java.lang.String` | `MODEL` Context: MODEL
`static java.lang.String` | `MODEL_OBJECTS`
`static java.lang.String` | `MODELS_STRING` Field: MODELS_STRING - store a delimited string of model names
`static java.lang.String` | `NAME`
`static java.lang.String` | `NEW_PEER`
`static java.lang.String` | `NO_SERVICE`
`static java.lang.String` | `NULL_STRING` Null string
`static java.lang.String` | `NUM_AUTOMED_TREES`
`static java.lang.String` | `PATHWAY`
`static java.lang.String` | `PEER`
`static java.lang.String` | `PEER_CFG_FILE`
`static java.lang.String` | `PEER_HOST` Field: PEER_HOST - represents the network host name of peer
`static java.lang.String` | `PEER_LIST`
`static java.lang.String` | `PEER_LIST_SCHEMA`
`static java.lang.String` | `PEER_NAME` Field: PEER_NAME - a string of peer name
`static java.lang.String` | `PERFORMATIVE`
`static java.lang.String` | `PORT`
`static java.lang.String` | `PUBLIC_SCHEMA_DIRECTORY_CFG` Deprecated. use `DIRECTORY_SERVER_CFG_FILE` instead
`static java.lang.String` | `QUALITY`
`static java.lang.String` | `QUERY`
`static java.lang.String` | `RECEIVER`
`static java.lang.String` | `RECOMMEND_ALL`
`static java.lang.String` | `RECOMMEND_ONE`
`static java.lang.String` | `REFUSE`
`static java.lang.String` | `REPLY_FAIL`
`static java.lang.String` | `REPLY_OK`
`static java.lang.String` | `REPLY_UNKNOWN`
`static java.lang.String` | `REPLY_UNKNOWN_REQUEST`
`static java.lang.String` | `REQUEST_GET_PORT`
`static java.lang.String` | `REQUEST_ID`
`static java.lang.String` | `REQUEST_PATHWAY`
`static java.lang.String` | `REQUEST_PATHWAY_TO_SOURCE`
`static java.lang.String` | `REQUEST_QUERY`
`static java.lang.String` | `REQUEST_REGISTER_PEER` static{ try { Object[]fileLines = Util.parseFile(PUBLIC_SCHEMA_DIRECTORY_CFG); for (int i=0;i-1 && l.indexOf(COMMENT)!=0) { String kw=l.substring(0,equalPos).trim().toLowerCase(); String val=l.substring(equalPos+1).trim(); if (kw.equals("directory")) { int colonPos=val.indexOf(":"); if (colonPos>-1) { directoryHost= InetAddress.getByName(val.substring(0,colonPos)); directoryPort=Integer.parseInt(val.substring(colonPos+1)); } else directoryHost=InetAddress.getByName(val);; } else if (kw.equals("registryport")) { registryPort=Integer.parseInt(val); } } else if (l.indexOf(COMMENT)!=0 && l.length()>0) { System.out.println("Warning: Incorrect line "+fileLines[i]); } } } catch (Exception e) { Logger.error("ERROR: Unable to set directory/registry", e); throw new InconsistentException("P2P services failed to read valid "+ "Directory and Registry details: Please correct "+ PUBLIC_SCHEMA_DIRECTORY_CFG,e); } }
`static java.lang.String` | `REQUEST_REMOVE_PEER`
`static java.lang.String` | `REQUEST_SCHEMA`
`static java.lang.String` | `RESULT`
`static java.lang.String` | `SCHEMA`
`static java.lang.String` | `SCHEMA_LIST`
`static java.lang.String` | `SCHEMA_NAME` Field: SCHEMA_NAME - a string of schema name
`static java.lang.String` | `SCHEMA_NAME_SUFFIX`
`static java.lang.String` | `SENDER`
`static java.lang.String` | `STATUS`
`static java.lang.String` | `TELL`
`static java.lang.String` | `TELL_BROKER`
`static java.lang.String` | `TO_SCHEMA`
`static java.lang.String` | `UNREGISTER_PEER` Context: un-registering peer
`static java.lang.String` | `UPDATE_DATA` Context: update peer data
`static java.lang.String` | `VALUE`
`static java.lang.String` | `WRONG_FORMAT`
`static java.lang.String` | `XML_VALUE_DELIMITER`

Constructor Summary
`P2PConstants()`

Method Summary

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

Field Detail

### debug

    public static final boolean debug

See Also:
  Constant Field Values

### COMMENT

    public static final java.lang.String COMMENT

  Comment string in configuration files

  See Also:
    Constant Field Values

### PUBLIC_SCHEMA_DIRECTORY_CFG

    public static final java.lang.String PUBLIC_SCHEMA_DIRECTORY_CFG

  Deprecated. use `DIRECTORY_SERVER_CFG_FILE` instead
  See Also:
    Constant Field Values

### PEER_CFG_FILE

    public static final java.lang.String PEER_CFG_FILE

See Also:
  Constant Field Values

### DIRECTORY_SERVER_CFG_FILE

    public static final java.lang.String DIRECTORY_SERVER_CFG_FILE

See Also:
  Constant Field Values

### REQUEST_REGISTER_PEER

    public static final java.lang.String REQUEST_REGISTER_PEER

  static{ try { Object[]fileLines = Util.parseFile(PUBLIC_SCHEMA_DIRECTORY_CFG); for (int i=0;i-1 && l.indexOf(COMMENT)!=0) { String kw=l.substring(0,equalPos).trim().toLowerCase(); String val=l.substring(equalPos+1).trim(); if (kw.equals("directory")) { int colonPos=val.indexOf(":"); if (colonPos>-1) { directoryHost= InetAddress.getByName(val.substring(0,colonPos)); directoryPort=Integer.parseInt(val.substring(colonPos+1)); } else directoryHost=InetAddress.getByName(val);; } else if (kw.equals("registryport")) { registryPort=Integer.parseInt(val); } } else if (l.indexOf(COMMENT)!=0 && l.length()>0) { System.out.println("Warning: Incorrect line "+fileLines[i]); } } } catch (Exception e) { Logger.error("ERROR: Unable to set directory/registry", e); throw new InconsistentException("P2P services failed to read valid "+ "Directory and Registry details: Please correct "+ PUBLIC_SCHEMA_DIRECTORY_CFG,e); } }

  See Also:
    Constant Field Values

### REQUEST_REMOVE_PEER

    public static final java.lang.String REQUEST_REMOVE_PEER

See Also:
  Constant Field Values

### REQUEST_GET_PORT

    public static final java.lang.String REQUEST_GET_PORT

See Also:
  Constant Field Values

### REQUEST_SCHEMA

    public static final java.lang.String REQUEST_SCHEMA

See Also:
  Constant Field Values

### REQUEST_PATHWAY

    public static final java.lang.String REQUEST_PATHWAY

See Also:
  Constant Field Values

### REQUEST_PATHWAY_TO_SOURCE

    public static final java.lang.String REQUEST_PATHWAY_TO_SOURCE

See Also:
  Constant Field Values

### REQUEST_QUERY

    public static final java.lang.String REQUEST_QUERY

See Also:
  Constant Field Values

### REPLY_OK

    public static final java.lang.String REPLY_OK

See Also:
  Constant Field Values

### REPLY_FAIL

    public static final java.lang.String REPLY_FAIL

See Also:
  Constant Field Values

### REPLY_UNKNOWN

    public static final java.lang.String REPLY_UNKNOWN

See Also:
  Constant Field Values

### REPLY_UNKNOWN_REQUEST

    public static final java.lang.String REPLY_UNKNOWN_REQUEST

See Also:
  Constant Field Values

### TELL_BROKER

    public static final java.lang.String TELL_BROKER

See Also:
  Constant Field Values

### MESSAGE_DELIMITER

    public static final java.lang.String MESSAGE_DELIMITER

See Also:
  Constant Field Values

### XML_VALUE_DELIMITER

    public static final java.lang.String XML_VALUE_DELIMITER

See Also:
  Constant Field Values

### MESSAGE_BODY_DELIMITER

    public static final java.lang.String MESSAGE_BODY_DELIMITER

See Also:
  Constant Field Values

### SCHEMA_NAME_SUFFIX

    public static final java.lang.String SCHEMA_NAME_SUFFIX

See Also:
  Constant Field Values

### PERFORMATIVE

    public static final java.lang.String PERFORMATIVE

See Also:
  Constant Field Values

### TELL

    public static final java.lang.String TELL

See Also:
  Constant Field Values

### ERROR

    public static final java.lang.String ERROR

See Also:
  Constant Field Values

### REFUSE

    public static final java.lang.String REFUSE

See Also:
  Constant Field Values

### FAIL

    public static final java.lang.String FAIL

See Also:
  Constant Field Values

### CONFIRM

    public static final java.lang.String CONFIRM

See Also:
  Constant Field Values

### ADVERTISE

    public static final java.lang.String ADVERTISE

See Also:
  Constant Field Values

### BROKER_ALL

    public static final java.lang.String BROKER_ALL

See Also:
  Constant Field Values

### ASK

    public static final java.lang.String ASK

See Also:
  Constant Field Values

### RECOMMEND_ONE

    public static final java.lang.String RECOMMEND_ONE

See Also:
  Constant Field Values

### RECOMMEND_ALL

    public static final java.lang.String RECOMMEND_ALL

See Also:
  Constant Field Values

### SENDER

    public static final java.lang.String SENDER

See Also:
  Constant Field Values

### RECEIVER

    public static final java.lang.String RECEIVER

See Also:
  Constant Field Values

### CONTENT

    public static final java.lang.String CONTENT

See Also:
  Constant Field Values

### LIST

    public static final java.lang.String LIST

See Also:
  Constant Field Values

### VALUE

    public static final java.lang.String VALUE

See Also:
  Constant Field Values

### ANY

    public static final java.lang.String ANY

See Also:
  Constant Field Values

### QUERY

    public static final java.lang.String QUERY

See Also:
  Constant Field Values

### PEER

    public static final java.lang.String PEER

See Also:
  Constant Field Values

### EXISTING_PEER

    public static final java.lang.String EXISTING_PEER

See Also:
  Constant Field Values

### NEW_PEER

    public static final java.lang.String NEW_PEER

See Also:
  Constant Field Values

### WRONG_FORMAT

    public static final java.lang.String WRONG_FORMAT

See Also:
  Constant Field Values

### NO_SERVICE

    public static final java.lang.String NO_SERVICE

See Also:
  Constant Field Values

### CONSTRAINTS

    public static final java.lang.String CONSTRAINTS

See Also:
  Constant Field Values

### REQUEST_ID

    public static final java.lang.String REQUEST_ID

See Also:
  Constant Field Values

### CONTEXT

    public static final java.lang.String CONTEXT

See Also:
  Constant Field Values

### SCHEMA

    public static final java.lang.String SCHEMA

See Also:
  Constant Field Values

### SCHEMA_LIST

    public static final java.lang.String SCHEMA_LIST

See Also:
  Constant Field Values

### PEER_LIST

    public static final java.lang.String PEER_LIST

See Also:
  Constant Field Values

### PEER_LIST_SCHEMA

    public static final java.lang.String PEER_LIST_SCHEMA

See Also:
  Constant Field Values

### PATHWAY

    public static final java.lang.String PATHWAY

See Also:
  Constant Field Values

### FROM_SCHEMA

    public static final java.lang.String FROM_SCHEMA

See Also:
  Constant Field Values

### TO_SCHEMA

    public static final java.lang.String TO_SCHEMA

See Also:
  Constant Field Values

### AUTOMED_OBJECTS

    public static final java.lang.String AUTOMED_OBJECTS

See Also:
  Constant Field Values

### MODEL_OBJECTS

    public static final java.lang.String MODEL_OBJECTS

See Also:
  Constant Field Values

### NUM_AUTOMED_TREES

    public static final java.lang.String NUM_AUTOMED_TREES

See Also:
  Constant Field Values

### QUALITY

    public static final java.lang.String QUALITY

See Also:
  Constant Field Values

### DESCRIPTION

    public static final java.lang.String DESCRIPTION

See Also:
  Constant Field Values

### RESULT

    public static final java.lang.String RESULT

See Also:
  Constant Field Values

### ADDRESS

    public static final java.lang.String ADDRESS

See Also:
  Constant Field Values

### NAME

    public static final java.lang.String NAME

See Also:
  Constant Field Values

### PORT

    public static final java.lang.String PORT

See Also:
  Constant Field Values

### METADATA

    public static final java.lang.String METADATA

See Also:
  Constant Field Values

### STATUS

    public static final java.lang.String STATUS

See Also:
  Constant Field Values

### LAST_UPDATE

    public static final java.lang.String LAST_UPDATE

See Also:
  Constant Field Values

### MODEL

    public static final java.lang.String MODEL

  Context: MODEL

  See Also:
    Constant Field Values

### KEEP_ALIVE

    public static final java.lang.String KEEP_ALIVE

  Context: keep alive (udp)

  See Also:
    Constant Field Values

### UNREGISTER_PEER

    public static final java.lang.String UNREGISTER_PEER

  Context: un-registering peer

  See Also:
    Constant Field Values

### UPDATE_DATA

    public static final java.lang.String UPDATE_DATA

  Context: update peer data

  See Also:
    Constant Field Values

### MODELS_STRING

    public static final java.lang.String MODELS_STRING

  Field: MODELS_STRING - store a delimited string of model names

  See Also:
    Constant Field Values

### SCHEMA_NAME

    public static final java.lang.String SCHEMA_NAME

  Field: SCHEMA_NAME - a string of schema name

  See Also:
    Constant Field Values

### PEER_NAME

    public static final java.lang.String PEER_NAME

  Field: PEER_NAME - a string of peer name

  See Also:
    Constant Field Values

### PEER_HOST

    public static final java.lang.String PEER_HOST

  Field: PEER_HOST - represents the network host name of peer

  See Also:
    Constant Field Values

### NULL_STRING

    public static final java.lang.String NULL_STRING

  Null string

  See Also:
    Constant Field Values

Constructor Detail

### P2PConstants

    public P2PConstants()

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