org.apache.webbeans.web.failover
Class DefaultOwbFailOverService

java.lang.Object
  extended by org.apache.webbeans.web.failover.DefaultOwbFailOverService
All Implemented Interfaces:
FailOverService

public class DefaultOwbFailOverService
extends Object
implements FailOverService


Field Summary
 
Fields inherited from interface org.apache.webbeans.spi.FailOverService
NOT_HANDLED
 
Constructor Summary
DefaultOwbFailOverService()
           
 
Method Summary
 void enableFailOverSupport(boolean flag)
           
 void enablePassivationSupport(boolean flag)
           
 String getFailOverAttributeName()
           
 String getJVMId()
           
 ObjectInputStream getObjectInputStream(InputStream in)
          Get object input stream.
 ObjectOutputStream getObjectOutputStream(OutputStream out)
          Get object output stream.
 Object handleResource(javax.enterprise.inject.spi.Bean<?> bean, Object resourceObject, ObjectInput in, ObjectOutput out)
          Except the EJB remote stub, it is hard to handle other types of resources.
 boolean isSupportFailOver()
           
 boolean isSupportPassivation()
           
 void restoreBeans(javax.servlet.http.HttpSession session)
           
 void sessionIsIdle(javax.servlet.http.HttpSession session)
           
 void sessionIsInUse(javax.servlet.http.HttpSession session)
           
 void sessionWillPassivate(javax.servlet.http.HttpSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOwbFailOverService

public DefaultOwbFailOverService()
Method Detail

getJVMId

public String getJVMId()
Specified by:
getJVMId in interface FailOverService

getFailOverAttributeName

public String getFailOverAttributeName()
Specified by:
getFailOverAttributeName in interface FailOverService

sessionIsIdle

public void sessionIsIdle(javax.servlet.http.HttpSession session)
Specified by:
sessionIsIdle in interface FailOverService

sessionIsInUse

public void sessionIsInUse(javax.servlet.http.HttpSession session)
Specified by:
sessionIsInUse in interface FailOverService

sessionWillPassivate

public void sessionWillPassivate(javax.servlet.http.HttpSession session)
Specified by:
sessionWillPassivate in interface FailOverService

restoreBeans

public void restoreBeans(javax.servlet.http.HttpSession session)
Specified by:
restoreBeans in interface FailOverService

isSupportFailOver

public boolean isSupportFailOver()
Specified by:
isSupportFailOver in interface FailOverService

isSupportPassivation

public boolean isSupportPassivation()
Specified by:
isSupportPassivation in interface FailOverService

enableFailOverSupport

public void enableFailOverSupport(boolean flag)
Specified by:
enableFailOverSupport in interface FailOverService

enablePassivationSupport

public void enablePassivationSupport(boolean flag)
Specified by:
enablePassivationSupport in interface FailOverService

getObjectInputStream

public ObjectInputStream getObjectInputStream(InputStream in)
                                       throws IOException
Get object input stream. Note, the stream should support deserialize javassist objects.

Specified by:
getObjectInputStream in interface FailOverService
Returns:
custom object input stream.
Throws:
IOException

getObjectOutputStream

public ObjectOutputStream getObjectOutputStream(OutputStream out)
                                         throws IOException
Get object output stream. Note, the stream should support deserialize javassist objects.

Specified by:
getObjectOutputStream in interface FailOverService
Returns:
custom object output stream.
Throws:
IOException

handleResource

public Object handleResource(javax.enterprise.inject.spi.Bean<?> bean,
                             Object resourceObject,
                             ObjectInput in,
                             ObjectOutput out)
Except the EJB remote stub, it is hard to handle other types of resources. Here we delegate serialization/deserialization to the application provided SerializationHandler.

Specified by:
handleResource in interface FailOverService


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.