org.ow2.petals.microkernel.api.communication.jndi.client.JNDIServiceInterceptorLC1a2eb783 Maven / Gradle / Ivy
/*
* Generated by:
* org.objectweb.fractal.juliac.proxy.InterceptorClassGenerator
* org.objectweb.fractal.juliac.proxy.LifeCycleSourceCodeGenerator matches true
* on: Wed Sep 21 08:11:46 GMT+01:00 2016
*/
package org.ow2.petals.microkernel.api.communication.jndi.client;
public class JNDIServiceInterceptorLC1a2eb783
implements org.ow2.petals.microkernel.api.communication.jndi.client.JNDIService,org.objectweb.fractal.julia.Interceptor {
private org.ow2.petals.microkernel.api.communication.jndi.client.JNDIService _impl;
private juliac.generated.LifeCycleControllerImpl _lc;
public JNDIServiceInterceptorLC1a2eb783() {
}
private JNDIServiceInterceptorLC1a2eb783(Object obj) {
setFcItfDelegate(obj);
}
public void initFcController(org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException {
Object olc = ic.getInterface("lifecycle-controller");
if ( !( olc instanceof juliac.generated.LifeCycleControllerImpl ) )
{
while ( olc instanceof org.objectweb.fractal.julia.Interceptor )
{
olc = ((org.objectweb.fractal.julia.Interceptor)olc).getFcItfDelegate();
}
}
_lc = (juliac.generated.LifeCycleControllerImpl) olc;
}
public Object clone() {
JNDIServiceInterceptorLC1a2eb783 clone = new JNDIServiceInterceptorLC1a2eb783(getFcItfDelegate());
clone._lc = _lc;
return clone;
}
public Object getFcItfDelegate() {
return _impl;
}
public void setFcItfDelegate(Object obj) {
_impl = (org.ow2.petals.microkernel.api.communication.jndi.client.JNDIService)obj;
}
public javax.naming.InitialContext getInitialContext() throws javax.naming.NamingException {
synchronized(_lc)
{
if ( _lc.fcState != 2 )
{
_lc.incrementFcInvocationCounter();
}
else
{
_lc.fcInvocationCounter++;
}
}
try {
javax.naming.InitialContext ret = _impl.getInitialContext();
return ret;
}
finally {
synchronized(_lc)
{
if ( _lc.fcState != 2 )
{
_lc.decrementFcInvocationCounter();
}
else
{
_lc.fcInvocationCounter--;
}
}
}
}
public javax.naming.Context getUsersContext() throws javax.naming.NamingException {
synchronized(_lc)
{
if ( _lc.fcState != 2 )
{
_lc.incrementFcInvocationCounter();
}
else
{
_lc.fcInvocationCounter++;
}
}
try {
javax.naming.Context ret = _impl.getUsersContext();
return ret;
}
finally {
synchronized(_lc)
{
if ( _lc.fcState != 2 )
{
_lc.decrementFcInvocationCounter();
}
else
{
_lc.fcInvocationCounter--;
}
}
}
}
}