QuickServer
v1.4.7

org.quickserver.util.xmlreader
Class AdvancedSettings

java.lang.Object
  extended byorg.quickserver.util.xmlreader.AdvancedSettings
All Implemented Interfaces:
java.io.Serializable

public class AdvancedSettings
extends java.lang.Object
implements java.io.Serializable

This class encapsulate Advanced Settings. The example xml is

        ....
        <advanced-settings>
                <charset>ISO-8859-1<charset>
                <byte-buffer-size>61440<byte-buffer-size>
                <use-direct-byte-buffer>true</use-direct-byte-buffer>
                <backlog>1024</backlog>		
                <socket-linger>-1</socket-linger>
                <debug-non-blocking-mode>false</debug-non-blocking-mode> 
        </advanced-settings>
        ....
 

Since:
1.4.5
Author:
Akshathkumar Shetty
See Also:
Serialized Form

Constructor Summary
AdvancedSettings()
           
 
Method Summary
 int getBacklog()
          Returns the listen backlog length for the QuickServer.
 int getByteBufferSize()
          Returns ByteBuffer size to be used in ByteBuffer pool.
 java.lang.String getCharset()
          Returns Charset to be used for String decoding and encoding..
 java.lang.String getClientIdentifier()
          Returns the ClientIdentifier class that that implements ClientIdentifier.
 boolean getDebugNonBlockingMode()
          Returns DebugNonBlockingMode flag.
 int getMaxThreadsForNioWrite()
          Returns the maximum threads allowed for nio write.
 java.lang.String getQSObjectPoolMaker()
          Returns the QSObjectPoolMaker class that implements QSObjectPoolMaker.
 int getSocketLinger()
          Returns linger time in seconds.
 boolean getUseDirectByteBuffer()
          Returns UseDirectByteBuffer flag.
 void setBacklog(int backlog)
          Sets the listen backlog length for the QuickServer to listen on.
 void setByteBufferSize(int byteBufferSize)
          Sets the ByteBuffer size to be used in ByteBuffer pool.
 void setCharset(java.lang.String charset)
          Sets the Charset to be used for String decoding and encoding.
 void setClientIdentifier(java.lang.String clientIdentifierClass)
          Sets the ClientIdentifier class that implements ClientIdentifier.
 void setDebugNonBlockingMode(boolean debugNonBlockingMode)
          Sets the DebugNonBlockingMode flag.
 void setMaxThreadsForNioWrite(int maxThreadsForNioWrite)
          Sets the maximum threads allowed for nio write.
 void setQSObjectPoolMaker(java.lang.String qSObjectPoolMakerClass)
          Sets the QSObjectPoolMaker class that implements QSObjectPoolMaker.
 void setSocketLinger(int socketLinger)
          Enable SO_LINGER with the specified linger time in seconds.
 void setUseDirectByteBuffer(boolean flag)
          Sets the UseDirectByteBuffer flag.
 java.lang.String toXML(java.lang.String pad)
          Returns XML config of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedSettings

public AdvancedSettings()
Method Detail

setCharset

public void setCharset(java.lang.String charset)
Sets the Charset to be used for String decoding and encoding. XML Tag: <charset>ISO-8859-1</charset>

Parameters:
charset - to be used for String decoding and encoding
See Also:
getCharset()

getCharset

public java.lang.String getCharset()
Returns Charset to be used for String decoding and encoding..

See Also:
setCharset(java.lang.String)

setByteBufferSize

public void setByteBufferSize(int byteBufferSize)
Sets the ByteBuffer size to be used in ByteBuffer pool. XML Tag: <byte-buffer-size>65536</byte-buffer-size>

Parameters:
byteBufferSize - size to be used in ByteBuffer pool.
See Also:
getByteBufferSize()

getByteBufferSize

public int getByteBufferSize()
Returns ByteBuffer size to be used in ByteBuffer pool.

See Also:
setByteBufferSize(int)

setBacklog

public void setBacklog(int backlog)
Sets the listen backlog length for the QuickServer to listen on. If not set or set a value equal or less than 0, then the default value will be assumed.
XML Tag: <backlog>0</backlog>

Parameters:
backlog - The listen backlog length.
See Also:
getBacklog()

getBacklog

public int getBacklog()
Returns the listen backlog length for the QuickServer.

See Also:
setBacklog(int)

setUseDirectByteBuffer

public void setUseDirectByteBuffer(boolean flag)
Sets the UseDirectByteBuffer flag. If not set, it will use true
XML Tag: <use-direct-byte-buffer>true</use-direct-byte-buffer>

Parameters:
flag - UseDirectByteBuffer flag.
See Also:
getUseDirectByteBuffer()

getUseDirectByteBuffer

public boolean getUseDirectByteBuffer()
Returns UseDirectByteBuffer flag.

See Also:
setUseDirectByteBuffer(boolean)

setSocketLinger

public void setSocketLinger(int socketLinger)
Enable SO_LINGER with the specified linger time in seconds. If linger time is less than 0 SO_LINGER will be disable. XML Tag: <socket-linger>-1</socket-linger>

Parameters:
socketLinger - if the linger value is negative SO_LINGER will be disable.
See Also:
getSocketLinger()

getSocketLinger

public int getSocketLinger()
Returns linger time in seconds. If SO_LINGER is disabled time will be negative;

See Also:
setSocketLinger(int)

setDebugNonBlockingMode

public void setDebugNonBlockingMode(boolean debugNonBlockingMode)
Sets the DebugNonBlockingMode flag. If not set, it will use false
XML Tag: <debug-non-blocking-mode>false</debug-non-blocking-mode>

Parameters:
debugNonBlockingMode - DebugNonBlockingMode flag.
See Also:
getDebugNonBlockingMode()

getDebugNonBlockingMode

public boolean getDebugNonBlockingMode()
Returns DebugNonBlockingMode flag.

See Also:
setDebugNonBlockingMode(boolean)

setClientIdentifier

public void setClientIdentifier(java.lang.String clientIdentifierClass)
Sets the ClientIdentifier class that implements ClientIdentifier. XML Tag: <client-identifier>org.quickserver.net.server.impl.TryClientIdentifier</client-identifier>

Parameters:
clientIdentifierClass - the fully qualified name of the class that implements ClientIdentifier.
See Also:
getClientIdentifier()

getClientIdentifier

public java.lang.String getClientIdentifier()
Returns the ClientIdentifier class that that implements ClientIdentifier.

See Also:
setClientIdentifier(java.lang.String)

setQSObjectPoolMaker

public void setQSObjectPoolMaker(java.lang.String qSObjectPoolMakerClass)
Sets the QSObjectPoolMaker class that implements QSObjectPoolMaker. XML Tag: <qsobject-pool-maker>org.quickserver.util.pool.MakeQSObjectPool</qsobject-pool-maker>

Parameters:
qSObjectPoolMakerClass - the fully qualified name of the class that implements QSObjectPoolMaker.
See Also:
getQSObjectPoolMaker()

getQSObjectPoolMaker

public java.lang.String getQSObjectPoolMaker()
Returns the QSObjectPoolMaker class that implements QSObjectPoolMaker.

See Also:
setQSObjectPoolMaker(java.lang.String)

setMaxThreadsForNioWrite

public void setMaxThreadsForNioWrite(int maxThreadsForNioWrite)
Sets the maximum threads allowed for nio write. If set to 0 or less no limit is imposed. XML Tag: <max-threads-for-nio-write>10</max-threads-for-nio-write>

Parameters:
maxThreadsForNioWrite - maximum threads allowed for nio write
Since:
1.4.6
See Also:
getMaxThreadsForNioWrite()

getMaxThreadsForNioWrite

public int getMaxThreadsForNioWrite()
Returns the maximum threads allowed for nio write.

Since:
1.4.6
See Also:
setMaxThreadsForNioWrite(int)

toXML

public java.lang.String toXML(java.lang.String pad)
Returns XML config of this class.


QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org