GigaSpaces XAP 10.0.1 API

org.openspaces.pu.container.jee.jetty.holder
Class SharedJettyHolder

java.lang.Object
  extended by org.openspaces.pu.container.jee.jetty.holder.JettyHolder
      extended by org.openspaces.pu.container.jee.jetty.holder.SharedJettyHolder

public class SharedJettyHolder
extends JettyHolder

A shared jetty holder that keeps upon first construction will store a static jetty instance and will reused it from then on. Upon the "last" call to stop, will actually stop the jetty instance.

Author:
kimchy

Constructor Summary
SharedJettyHolder(org.eclipse.jetty.server.Server localServer)
           
 
Method Summary
 org.eclipse.jetty.server.Server getServer()
          Returns the jetty server.
 boolean isSingleInstance()
          Returns true if this is a single instance.
 void start()
          Start Jetty.
 void stop()
          Stops Jetty.
 
Methods inherited from class org.openspaces.pu.container.jee.jetty.holder.JettyHolder
closeConnectors, openConnectors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedJettyHolder

public SharedJettyHolder(org.eclipse.jetty.server.Server localServer)
Method Detail

start

public void start()
           throws Exception
Description copied from class: JettyHolder
Start Jetty. Note, if this fails, make sure to call JettyHolder.stop()

Overrides:
start in class JettyHolder
Throws:
Exception

stop

public void stop()
          throws Exception
Description copied from class: JettyHolder
Stops Jetty.

Overrides:
stop in class JettyHolder
Throws:
Exception

getServer

public org.eclipse.jetty.server.Server getServer()
Description copied from class: JettyHolder
Returns the jetty server.

Specified by:
getServer in class JettyHolder

isSingleInstance

public boolean isSingleInstance()
Description copied from class: JettyHolder
Returns true if this is a single instance.

Specified by:
isSingleInstance in class JettyHolder

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.