GigaSpaces XAP 9.7.2 API

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

java.lang.Object
  extended by org.openspaces.pu.container.jee.jetty.holder.SharedJettyHolder
All Implemented Interfaces:
JettyHolder

public class SharedJettyHolder
extends Object
implements 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
 void closeConnectors()
          Closes Jetty ports.
 org.eclipse.jetty.server.Server getServer()
          Returns the jetty server.
 boolean isSingleInstance()
          Returns true if this is a single instance.
 void openConnectors()
          Open Jetty ports.
 void start()
          Start Jetty.
 void stop()
          Stops Jetty.
 
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

openConnectors

public void openConnectors()
                    throws Exception
Description copied from interface: JettyHolder
Open Jetty ports.

Specified by:
openConnectors in interface JettyHolder
Throws:
Exception

closeConnectors

public void closeConnectors()
                     throws Exception
Description copied from interface: JettyHolder
Closes Jetty ports.

Specified by:
closeConnectors in interface JettyHolder
Throws:
Exception

start

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

Specified by:
start in interface JettyHolder
Throws:
Exception

stop

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

Specified by:
stop in interface JettyHolder
Throws:
Exception

getServer

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

Specified by:
getServer in interface JettyHolder

isSingleInstance

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

Specified by:
isSingleInstance in interface JettyHolder

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.