AbstractServer
Keywords: uk.ac.ic.doc.automed.p2p.communication.AbstractServer 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.communication
Class AbstractServer

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.communication.AbstractServer

All Implemented Interfaces:
  Threadable

Direct Known Subclasses:
  TCPServer, UDPServer

    public abstract class AbstractServer

extends java.lang.Object
implements Threadable

Field Summary
`protected boolean` | `isReady`
`protected int` | `numWorkers`
`protected int` | `readBufferSize`
`protected int` | `serverPort`
`protected int` | `timeOut`

Constructor Summary
`AbstractServer(int serverPort, RequestListener handler)`

Method Summary
`RequestListener` | `getHandler()`
`boolean` | `getReadyState()`
`int` | `getServerPort()`
`abstract void` | `handleAction()` Handle thread's interrupted action
`abstract void` | `runAction()` Implement communication process
`protected void` | `setReadyState(boolean state)`

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

Field Detail

### serverPort

    protected int serverPort

### isReady

    protected boolean isReady

### readBufferSize

    protected int readBufferSize

### timeOut

    protected int timeOut

### numWorkers

    protected int numWorkers

Constructor Detail

### AbstractServer

    public AbstractServer(int serverPort,
                          RequestListener handler)

Method Detail

### getServerPort

    public int getServerPort()

### getHandler

    public RequestListener getHandler()

### getReadyState

    public boolean getReadyState()

  Specified by:
    `getReadyState` in interface `Threadable`

### setReadyState

    protected void setReadyState(boolean state)

### runAction

    public abstract void runAction()
                            throws AutoMedException

  Implement communication process

  Specified by:
    `runAction` in interface `Threadable`
  Throws:
    `AutoMedException`

### handleAction

    public abstract void handleAction()

  Handle thread's interrupted action

  Specified by:
    `handleAction` in interface `Threadable`

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