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

## com.caucho.server.http
Class ServletServer

    java.lang.Object
      |
      +--com.caucho.server.http.ServletServer

All Implemented Interfaces:
  AlarmListener, CronListener, java.util.EventListener, com.caucho.server.Server

public class ServletServer
extends java.lang.Object
implements AlarmListener, CronListener, com.caucho.server.Server

Base class for HTTP and Runner servers.

Field Summary
`protected WriteStream` | `dbg`

Method Summary
`void` | `addTcpServer(com.caucho.server.TcpServer server)` Adds a tcp server.
`void` | `adminRestart()`
`void` | `clearCache()` Clears the internal caches.
`void` | `clearSessionBackingCache()`
`void` | `close()` On shutdown, gracefully close the hosts.
`void` | `close(boolean shutdown)` On shutdown, gracefully close the hosts.
`void` | `cron(long now)` Timeout for cron jobs
`boolean` | `forbidConnection(java.net.Socket socket)` If we're forbidding hosts, see if this host is allowed.
`Srun` | `getOwnSrun()`
`java.util.HashMap` | `getPathVariableMap()` Returns the server's variable path.
`java.lang.String` | `getServerId()` Returns the server name.
`long` | `getServerSeed()` Returns the serverId seed.
`int` | `getSlowThreads()`
`Srun` | `getSrun(int sessionIndex)` Returns the srun with the specified session index.
`int` | `getSrunCount()` Returns the total number of sruns in the load balancing pool.
`Srun[]` | `getSrunGroup()` Returns the array of sruns.
`int` | `getSrunIndex()` Gets the assigned srun index for the JVM.
`long` | `getStartTime()` Returns the time in milliseconds when the server was started.
`java.util.ArrayList` | `getTcpServerAdminList()` Gets the tcp servers.
`void` | `handleAlarm(Alarm alarm)` Handles alarm callbacks every `reaperInterval`
`void` | `handleCron(Cron alarm)` Handles alarm callbacks every `reaperInterval`
`int` | `incrSession()`
`void` | `invalidateCache(java.lang.String url)` Invalidate entries matching the url
`void` | `killCache()`
`com.caucho.http.session.SessionBacking` | `lookupSessionBacking(java.lang.String id)`
`void` | `removeSessionBacking(java.lang.String id)` Removes the named session from the backing cache.
`void` | `setServerId(java.lang.String id)` When known, sets the srun index for the JVM.
`void` | `setSrunIndex(int index)` When known, sets the srun index for the JVM.
`void` | `timeout(long now)` Propagates the reaper callback to the hosts.

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

Field Detail

### dbg

    protected WriteStream dbg

Method Detail

### getServerSeed

    public long getServerSeed()

  Returns the serverId seed.

### addTcpServer

    public void addTcpServer(com.caucho.server.TcpServer server)

  Adds a tcp server.

### getTcpServerAdminList

    public java.util.ArrayList getTcpServerAdminList()

  Gets the tcp servers.

### clearCache

    public void clearCache()

  Clears the internal caches.

### invalidateCache

    public void invalidateCache(java.lang.String url)

  Invalidate entries matching the url

### getPathVariableMap

    public java.util.HashMap getPathVariableMap()

  Returns the server's variable path.

### forbidConnection

    public boolean forbidConnection(java.net.Socket socket)

  If we're forbidding hosts, see if this host is allowed.
  Specified by:
    `forbidConnection` in interface `com.caucho.server.Server`
  Parameters:
    `socket` - the newly accepted socket

### lookupSessionBacking

    public com.caucho.http.session.SessionBacking lookupSessionBacking(java.lang.String id)

### clearSessionBackingCache

    public void clearSessionBackingCache()

### removeSessionBacking

    public void removeSessionBacking(java.lang.String id)

  Removes the named session from the backing cache.

### getServerId

    public java.lang.String getServerId()

  Returns the server name.

### setServerId

    public void setServerId(java.lang.String id)

  When known, sets the srun index for the JVM.

### setSrunIndex

    public void setSrunIndex(int index)

  When known, sets the srun index for the JVM.

### getSrunIndex

    public int getSrunIndex()

  Gets the assigned srun index for the JVM.

### getSrunCount

    public int getSrunCount()

  Returns the total number of sruns in the load balancing pool.

### getOwnSrun

    public Srun getOwnSrun()

### getSrun

    public Srun getSrun(int sessionIndex)

  Returns the srun with the specified session index.

### getSrunGroup

    public Srun[] getSrunGroup()

  Returns the array of sruns.

### incrSession

    public int incrSession()

### handleAlarm

    public void handleAlarm(Alarm alarm)

  Handles alarm callbacks every `reaperInterval`

  The connections and the server actually handle the callbacks.

  Specified by:
    `handleAlarm` in interface `AlarmListener`

### handleCron

    public void handleCron(Cron alarm)

  Handles alarm callbacks every `reaperInterval`

  The connections and the server actually handle the callbacks.

  Specified by:
    `handleCron` in interface `CronListener`

### timeout

    public void timeout(long now)

  Propagates the reaper callback to the hosts.
  Parameters:
    `now` - current time.

### adminRestart

    public void adminRestart()

### cron

    public void cron(long now)

  Timeout for cron jobs
  Parameters:
    `now` - current time.

### getStartTime

    public long getStartTime()

  Returns the time in milliseconds when the server was started.

### getSlowThreads

    public int getSlowThreads()

### killCache

    public void killCache()

### close

    public void close()

  On shutdown, gracefully close the hosts.

### close

    public void close(boolean shutdown)

  On shutdown, gracefully close the hosts.

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