com.caucho.server.dispatch
Class InvocationServer

java.lang.Object
  extended by com.caucho.server.dispatch.InvocationServer
All Implemented Interfaces:
Dependency

public class InvocationServer
extends java.lang.Object
implements Dependency

The dispatch server is responsible for building Invocations, specifically for creating the FilterChain for the invocation.


Constructor Summary
InvocationServer(InvocationBuilder builder)
           
 
Method Summary
 void addServerListener(ServerListener listener)
          Adds a listener.
 Invocation buildInvocation(Invocation invocation)
          Builds the invocation.
 Invocation buildInvocation(java.lang.Object protocolKey, Invocation invocation)
          Builds the invocation, saving its value keyed by the protocol key.
 void clearCache()
          Clears the invocation cache.
 Invocation createInvocation()
          Creates an invocation.
 InvocationDecoder createInvocationDecoder()
          Returns the invocation decoder for configuration.
 void destroy()
          Closes the server.
 Invocation getInvocation(java.lang.Object protocolKey)
          Returns the cached invocation.
 InvocationBuilder getInvocationBuilder()
          Gets the dispatch builder.
 long getInvocationCacheHitCount()
          Returns the invocation cache hit count.
 long getInvocationCacheMissCount()
          Returns the invocation cache hit count.
 InvocationDecoder getInvocationDecoder()
          Returns the InvocationDecoder.
 java.util.ArrayList<Invocation> getInvocations()
          Returns the invocations.
 int getMaxURILength()
           
 java.lang.String getServerId()
          Gets the server's id.
 java.lang.String getURLCharacterEncoding()
          Sets URL encoding.
 void init()
          Initializes the server.
 void invalidateMatchingInvocations(InvocationMatcher matcher)
          Clears matching entries.
 boolean isDestroyed()
          Returns true if the server is destroyed.
 boolean isModified()
          Returns true if the server has been modified and needs restarting.
 boolean logModified(java.util.logging.Logger log)
          Log the reason for modification.
 void setInvocationCacheMaxURLLength(int length)
          Sets the max url length.
 void setInvocationCacheSize(int size)
          Sets the invocation cache size.
 void setMaxURILength(int maxURILength)
          Sets max uri length
 void setServerId(java.lang.String serverId)
          Gets the server's id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationServer

public InvocationServer(InvocationBuilder builder)
Method Detail

getServerId

public java.lang.String getServerId()
Gets the server's id.


setServerId

public void setServerId(java.lang.String serverId)
Gets the server's id.


getInvocationBuilder

public InvocationBuilder getInvocationBuilder()
Gets the dispatch builder.


setInvocationCacheSize

public void setInvocationCacheSize(int size)
Sets the invocation cache size.


setInvocationCacheMaxURLLength

public void setInvocationCacheMaxURLLength(int length)
Sets the max url length.


getMaxURILength

public int getMaxURILength()

setMaxURILength

public void setMaxURILength(int maxURILength)
Sets max uri length


init

@PostConstruct
public void init()
Initializes the server.


getInvocationDecoder

public InvocationDecoder getInvocationDecoder()
Returns the InvocationDecoder.


getURLCharacterEncoding

public java.lang.String getURLCharacterEncoding()
Sets URL encoding.


createInvocationDecoder

public InvocationDecoder createInvocationDecoder()
Returns the invocation decoder for configuration.


getInvocation

public final Invocation getInvocation(java.lang.Object protocolKey)
Returns the cached invocation.


createInvocation

public Invocation createInvocation()
Creates an invocation.


buildInvocation

public Invocation buildInvocation(java.lang.Object protocolKey,
                                  Invocation invocation)
                           throws ConfigException
Builds the invocation, saving its value keyed by the protocol key.

Parameters:
protocolKey - protocol-specific key to save the invocation in
invocation - the invocation to build.
Throws:
ConfigException

buildInvocation

public Invocation buildInvocation(Invocation invocation)
                           throws ConfigException
Builds the invocation.

Throws:
ConfigException

clearCache

public void clearCache()
Clears the invocation cache.


invalidateMatchingInvocations

public void invalidateMatchingInvocations(InvocationMatcher matcher)
Clears matching entries.


getInvocations

public java.util.ArrayList<Invocation> getInvocations()
Returns the invocations.


getInvocationCacheHitCount

public long getInvocationCacheHitCount()
Returns the invocation cache hit count.


getInvocationCacheMissCount

public long getInvocationCacheMissCount()
Returns the invocation cache hit count.


isModified

public boolean isModified()
Returns true if the server has been modified and needs restarting.

Specified by:
isModified in interface Dependency

logModified

public boolean logModified(java.util.logging.Logger log)
Log the reason for modification.

Specified by:
logModified in interface Dependency

addServerListener

public void addServerListener(ServerListener listener)
Adds a listener.


isDestroyed

public boolean isDestroyed()
Returns true if the server is destroyed.


destroy

public void destroy()
Closes the server.