org.opencrx.application.adapter
Class AbstractServer

java.lang.Object
  extended by org.opencrx.application.adapter.AbstractServer
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
IMAPServer, LDAPServer

public abstract class AbstractServer
extends Object
implements Runnable


Field Summary
protected  String bindAddress
           
protected  int delayOnStartup
           
protected  boolean isDebug
           
protected  javax.jdo.PersistenceManagerFactory pmf
           
protected  int portNumber
           
protected  String providerName
           
protected  String serverName
           
protected  ServerSocket serverSocket
           
protected  Map<Thread,AbstractSession> sessions
           
protected  String sslKeyPass
           
protected  String sslKeystoreFile
           
protected  String sslKeystorePass
           
protected  String sslKeystoreType
           
 
Constructor Summary
protected AbstractServer(String serverName, javax.jdo.PersistenceManagerFactory pmf, String providerName, String bindAddress, int portNumber, String sslKeystoreFile, String sslKeystoreType, String sslKeystorePass, String sslKeyPass, boolean isDebug, int delayOnStartup)
           
 
Method Summary
 boolean bind()
           
 javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
           
 String getProviderName()
           
 boolean isDebug()
           
abstract  AbstractSession newSession(Socket socket, AbstractServer server)
           
 void pause()
           
 void resume()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverName

protected final String serverName

bindAddress

protected final String bindAddress

sslKeystoreFile

protected final String sslKeystoreFile

sslKeystoreType

protected final String sslKeystoreType

sslKeystorePass

protected final String sslKeystorePass

sslKeyPass

protected final String sslKeyPass

portNumber

protected final int portNumber

providerName

protected final String providerName

isDebug

protected final boolean isDebug

delayOnStartup

protected final int delayOnStartup

sessions

protected final Map<Thread,AbstractSession> sessions

serverSocket

protected ServerSocket serverSocket

pmf

protected final javax.jdo.PersistenceManagerFactory pmf
Constructor Detail

AbstractServer

protected AbstractServer(String serverName,
                         javax.jdo.PersistenceManagerFactory pmf,
                         String providerName,
                         String bindAddress,
                         int portNumber,
                         String sslKeystoreFile,
                         String sslKeystoreType,
                         String sslKeystorePass,
                         String sslKeyPass,
                         boolean isDebug,
                         int delayOnStartup)
Method Detail

newSession

public abstract AbstractSession newSession(Socket socket,
                                           AbstractServer server)

bind

public boolean bind()
             throws ServiceException
Throws:
ServiceException

run

public void run()
Specified by:
run in interface Runnable

pause

public void pause()

resume

public void resume()

getProviderName

public String getProviderName()

isDebug

public boolean isDebug()

getPersistenceManagerFactory

public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()


This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.