Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 1998-2015 Caucho Technology -- all rights reserved
*
* This file is part of Baratine(TM)
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Baratine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Baratine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
* of NON-INFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with Baratine; if not, write to the
*
* Free Software Foundation, Inc.
* 59 Temple Place, Suite 330
* Boston, MA 02111-1307 USA
*
* @author Scott Ferguson
*/
package com.caucho.v5.amp.vault;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Provider;
import com.caucho.v5.amp.ServicesAmp;
import com.caucho.v5.amp.service.ServiceConfig;
import com.caucho.v5.amp.spi.StubContainerAmp;
import com.caucho.v5.amp.spi.HeadersAmp;
import com.caucho.v5.amp.stub.StubAmp;
import com.caucho.v5.amp.stub.StubClass;
import com.caucho.v5.amp.stub.MethodAmp;
import com.caucho.v5.amp.stub.MethodAmpBase;
import com.caucho.v5.amp.stub.StubAmpBean;
import com.caucho.v5.amp.stub.StubAmpBeanBase;
import com.caucho.v5.convert.ConvertException;
import com.caucho.v5.util.L10N;
import io.baratine.convert.Convert;
import io.baratine.inject.Key;
import io.baratine.service.OnLookup;
import io.baratine.service.Result;
import io.baratine.vault.Id;
import io.baratine.vault.IdAsset;
/**
* Stub for a vault.
*/
public class StubVault extends StubClass
{
private static final L10N L = new L10N(StubVault.class);
private static final Map,Convert> _convertMap
= new HashMap<>();
private VaultConfig _configResource;
private StubClassAsset _stubAsset;
private String _address;
public StubVault(ServicesAmp ampManager,
Class> type,
ServiceConfig configService,
VaultConfig configResource)
{
super(ampManager, type, type);
_configResource = configResource;
_address = configService.address();
Class> entityClass = _configResource.entityType();
_stubAsset = new StubClassAsset(ampManager,
entityClass,
configService,
configResource);
_stubAsset.introspect();
}
public static String test()
{
return int.class.toString();
}
@Override
public void introspect()
{
super.introspect();
introspectOnLookup();
}
private void introspectOnLookup()
{
if (isImplemented(OnLookup.class)) {
return;
}
Class> entityClass = _configResource.entityType();
Key