RequestListener
Keywords: uk.ac.ic.doc.automed.p2p.communication.RequestListener interface

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.communication
Interface RequestListener

All Known Implementing Classes:
  AbstractRequestListener, AutoMedPeer, DirectoryServicePeer, KeepAliveMessageHandler, P2PDirectory, P2PRegistry, Peer, SimpleMessageHandler, UnregisterPeerMessageHandler, UpdateDataMessageHandler

    public interface RequestListener

Author:
  Charis, Duc M Le

Method Summary
`AbstractMessage` | `getRequestMessage()` The message to send across
`byte[]` | `getResponseData()` Method to retrieve response data
`java.lang.String` | `getType()` The handler type
`void` | `handleRequest(byte[] dataReceived)` Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead
`void` | `handleRequest(byte[] dataReceived, java.io.OutputStream output)` Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead
`byte[]` | `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` An unified handler method for both UDP and TCP protocols
`byte[]` | `handleUDPRequest(byte[] dataReceived)` Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead
`byte[]` | `handleUDPRequest(java.net.InetAddress srcHost, int srcPort, byte[] dataReceived)` Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead
`byte[]` | `handleUDPRequest(java.lang.String srcHost, int srcPort, byte[] dataReceived)` Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

Method Detail

### handleRequest

    byte[] handleRequest(byte[] dataReceived,
                         ResponseHandler outputHandler)
                         throws CommunicationException

  An unified handler method for both UDP and TCP protocols

  Throws:
    `CommunicationException`

### getResponseData

    byte[] getResponseData()

  Method to retrieve response data

### getRequestMessage

    AbstractMessage getRequestMessage()
                                      throws AutoMedException

  The message to send across

  Throws:
    `AutoMedException`

### getType

    java.lang.String getType()

  The handler type

### handleRequest

    void handleRequest(byte[] dataReceived,
                       java.io.OutputStream output)
                       throws CommunicationException

  Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

  Handle TCP-type requests

  Throws:
    `CommunicationException`

### handleRequest

    void handleRequest(byte[] dataReceived)
                       throws CommunicationException

  Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

  Another handler for TCP-type requests

  Throws:
    `CommunicationException`

### handleUDPRequest

    byte[] handleUDPRequest(byte[] dataReceived)
                            throws CommunicationException

  Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

  Added by mdle on 25/10/2005 to handle UDP request

  Throws:
    `CommunicationException`

### handleUDPRequest

    byte[] handleUDPRequest(java.lang.String srcHost,
                            int srcPort,
                            byte[] dataReceived)
                            throws CommunicationException

  Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

  Added by mdle on 25/10/2005 to handle UDP request

  Throws:
    `CommunicationException`

### handleUDPRequest

    byte[] handleUDPRequest(java.net.InetAddress srcHost,
                            int srcPort,
                            byte[] dataReceived)
                            throws CommunicationException

  Deprecated. use `handleRequest(byte[] dataReceived, ResponseHandler outputHandler)` instead

  Added by mdle on 25/10/2005 to handle UDP request

  Throws:
    `CommunicationException`

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