jrun.servlet.http
Class SSLService

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.scheduler.ThreadPoolService
        |
        +--jrun.servlet.network.NetworkService
              |
              +--jrun.servlet.http.WebService
                    |
                    +--jrun.servlet.http.SSLService
All Implemented Interfaces:
NetworkServiceMBean, javax.naming.Referenceable, RunnableFactory, java.io.Serializable, Service, ServiceMBean, SSL, SSLServiceMBean, ThreadPoolServiceMBean, WebServiceMBean

public class SSLService
extends WebService
implements SSL

See Also:
Serialized Form

Fields inherited from class jrun.servlet.network.NetworkService
BYTES_IN, BYTES_OUT, HANDLED_MS, HANDLED_RQ, metricsElapsedIndex, metricsIndexIn, metricsIndexOut, metricsServicedIndex, serverSocketFactory, ss
 
Fields inherited from class jrunx.scheduler.ThreadPoolService
metrics, threadPool
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface jrunx.scheduler.RunnableFactory
BUSY, EXCEPTION, SHUTDOWN
 
Constructor Summary
SSLService()
           
 
Method Summary
protected  java.net.Socket accept()
          Subclasses can override this to change the socket class or implement a different concurrency policy.
protected  SSLEndpoint createEndpoint(WebService webService, java.net.Socket sock, int timeout)
           
 java.lang.Runnable createRunnable()
          return a smart endpoint used for implementing protocols that handle more than one request per socket connection.
 java.lang.String getMetricsPrefix()
          Gets the prefix to be used for metrics, such as "jcp" or "web".
 java.lang.String getServiceName()
          Gets the service name, such as JRun Web Server.
 SSL getSSL()
           
 void init()
          Not every service needs to init, implement it out of convenience.
 void setKeyStore(java.lang.String keyStore)
           
 void setKeyStorePassword(java.lang.String keyStorePassword)
           
 void setTrustStore(java.lang.String trustStore)
           
 java.lang.Runnable swapRunnable(java.lang.Runnable runnable)
          get the next runnable request from the socket.
 
Methods inherited from class jrun.servlet.http.WebService
destroy, destroyRunnable, invokeRunnable, isKeepAlive, setKeepAlive, start, stop
 
Methods inherited from class jrun.servlet.network.NetworkService
bindToSocket, createMetrics, getAvailablePort, getBacklog, getBindAddress, getInputMetricIndex, getInterface, getMetrics, getOutputMetricIndex, getPort, getRunnableFactory, getServicedMetricIndex, getSocketFactoryName, getTimeout, getTimeoutMs, setBacklog, setBindAddress, setInterface, setPort, setSocketFactoryName, setTimeout, updateRequestMetrics
 
Methods inherited from class jrunx.scheduler.ThreadPoolService
getActiveHandlerThreads, getMaxHandlerThreads, getMinHandlerThreads, getThreadWaitTimeout, setActiveHandlerThreads, setMaxHandlerThreads, setMinHandlerThreads, setThreadWaitTimeout
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrun.servlet.network.NetworkServiceMBean
getAvailablePort, getBacklog, getBindAddress, getInterface, getPort, getSocketFactoryName, getTimeout, setBacklog, setBindAddress, setInterface, setPort, setSocketFactoryName, setTimeout
 
Methods inherited from interface jrunx.scheduler.ThreadPoolServiceMBean
getActiveHandlerThreads, getMaxHandlerThreads, getMinHandlerThreads, getThreadWaitTimeout, setActiveHandlerThreads, setMaxHandlerThreads, setMinHandlerThreads, setThreadWaitTimeout
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
destroy, getStatus, start, stop, updateStatus
 

Constructor Detail

SSLService

public SSLService()
Method Detail

getSSL

public SSL getSSL()
Specified by:
getSSL in interface SSLServiceMBean

setKeyStore

public void setKeyStore(java.lang.String keyStore)
Specified by:
setKeyStore in interface SSLServiceMBean

setKeyStorePassword

public void setKeyStorePassword(java.lang.String keyStorePassword)
Specified by:
setKeyStorePassword in interface SSLServiceMBean

setTrustStore

public void setTrustStore(java.lang.String trustStore)
Specified by:
setTrustStore in interface SSLServiceMBean

accept

protected java.net.Socket accept()
                          throws java.io.IOException,
                                 java.lang.InterruptedException
Description copied from class: NetworkService
Subclasses can override this to change the socket class or implement a different concurrency policy.
Overrides:
accept in class NetworkService

createEndpoint

protected SSLEndpoint createEndpoint(WebService webService,
                                     java.net.Socket sock,
                                     int timeout)
                              throws java.io.IOException

createRunnable

public java.lang.Runnable createRunnable()
                                  throws java.lang.InterruptedException
Description copied from class: WebService
return a smart endpoint used for implementing protocols that handle more than one request per socket connection.
Overrides:
createRunnable in class WebService
Following copied from interface: jrunx.scheduler.RunnableFactory
Returns:
an endpoint for requests and responses. never null.
Throws:
java.lang.InterruptedException - if a timeout or interrupt occurs

init

public void init()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Not every service needs to init, implement it out of convenience.
Specified by:
init in interface Service
Overrides:
init in class WebService

swapRunnable

public java.lang.Runnable swapRunnable(java.lang.Runnable runnable)
                                throws java.lang.InterruptedException
get the next runnable request from the socket.
Overrides:
swapRunnable in class WebService
Following copied from interface: jrunx.scheduler.RunnableFactory
Parameters:
ep - a previously used endpoint for recycling
Returns:
a new runnable object, or null if no more exist.
Throws:
java.lang.InterruptedException - if an interrupt or timeout occurs.

getServiceName

public java.lang.String getServiceName()
Description copied from class: NetworkService
Gets the service name, such as JRun Web Server. This must be implemented by any subclasses
Overrides:
getServiceName in class WebService

getMetricsPrefix

public java.lang.String getMetricsPrefix()
Description copied from class: NetworkService
Gets the prefix to be used for metrics, such as "jcp" or "web". This must be implemented by any subclasses.
Overrides:
getMetricsPrefix in class WebService


Copyright � 2002 Macromedia Corporation. All Rights Reserved.