P2PProtocol
Keywords: uk.ac.ic.doc.automed.p2p.protocol.P2PProtocol 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 P2PProtocol

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

    public class P2PProtocol

extends java.lang.Object

Author:
  Charis TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
`P2PProtocol()`

Method Summary
`protected static java.lang.String` | `buildMessage(java.lang.String request, java.lang.String[] bodyParts)`
`static java.lang.String` | `buildPathwayRequest(java.lang.String fromSchema, java.lang.String toSchema)`
`static java.lang.String` | `buildPathwayToSourceRequest(java.lang.String schemaName)`
`static java.lang.String` | `buildPortRequest(java.lang.String peerName)`
`static java.lang.String` | `buildQueryRequest(java.lang.String schemaName, java.lang.String query)`
`static java.lang.String` | `buildRegisterRequest(java.lang.String name, int port)`
`static java.lang.String` | `buildSchemaRequest(java.lang.String schemaName)`
`static boolean` | `isLegalPeerName(java.lang.String name)`
`static boolean` | `isLegalQuery(java.lang.String query)`
`static boolean` | `isLegalSchemaName(java.lang.String schema)`
`static Request` | `parseRequest(java.lang.String message)`

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

Constructor Detail

### P2PProtocol

    public P2PProtocol()

Method Detail

### buildMessage

    protected static final java.lang.String buildMessage(java.lang.String request,
                                                         java.lang.String[] bodyParts)

### buildRegisterRequest

    public static final java.lang.String buildRegisterRequest(java.lang.String name,
                                                              int port)

### buildSchemaRequest

    public static final java.lang.String buildSchemaRequest(java.lang.String schemaName)

### buildPathwayToSourceRequest

    public static final java.lang.String buildPathwayToSourceRequest(java.lang.String schemaName)

### buildQueryRequest

    public static final java.lang.String buildQueryRequest(java.lang.String schemaName,
                                                           java.lang.String query)

### buildPathwayRequest

    public static final java.lang.String buildPathwayRequest(java.lang.String fromSchema,
                                                             java.lang.String toSchema)

### buildPortRequest

    public static java.lang.String buildPortRequest(java.lang.String peerName)

### parseRequest

    public static Request parseRequest(java.lang.String message)

### isLegalPeerName

    public static boolean isLegalPeerName(java.lang.String name)

  Parameters:
    `name` -
  Returns:

### isLegalSchemaName

    public static boolean isLegalSchemaName(java.lang.String schema)

  Parameters:
    `fromSchema` -
  Returns:

### isLegalQuery

    public static boolean isLegalQuery(java.lang.String query)

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