A proxy class is a class functioning as an interface to another class or a service. Proxy classes are implementation of Proxy design pattern. These classes help using large objects or other resources that are expensive or impossible to duplicate.
Questions tagged [proxy-classes]
342 questions
0
votes
1 answer
Enhancing a java object at runtime
I am aware that using proxy capable libraries (javassist, JDK dynamic proxies, etc) that it is possible to enhance a class to implement an interface at runtime.
My question is: is it possible to enhance an instantiated object to implement an…

john
- 203
- 1
- 2
- 4
0
votes
2 answers
How Entity Framework uses proxy classes to support lazy loading?
I want to have an understanding of how Entity Framework uses Proxy classes? Why Entity Framework needs Proxy classes? What actually happens behind the scenes when Lazy loading is Enabled?

Nikhil
- 379
- 1
- 3
- 14
0
votes
2 answers
using Nhibernate lazy proxys with a webservice
Recently i had some performance problems in a SOAP webservice I wrote a while ago. I noticed I had a lot of queries going on and my hbm.xml mappings where full of lazy=false statements. I upgraded to NHibernate 3.0 and removed the lazy = false stuff…

Gluip
- 2,917
- 4
- 37
- 46
0
votes
1 answer
Extending web service proxy classes
I need to add functionality to my web service calls so object translation and automatic retries are done and abstracted away.
I would usually override the base class to add the extra functionality, but as the proxy methods aren't over-ridable I…

Mr Shoubs
- 14,629
- 17
- 68
- 107
0
votes
2 answers
Castle Dynamic Proxy wants to intercept Object.GetType()
In a project, I'm using a Castle Dynamic Proxy to wrap all code run by a façade in try/catch blocks (sounds odd? Explained here). That works fine, but to make sure all method calls are intercepted, I throw an exception when I come across something…

joneberg
- 235
- 1
- 10
0
votes
1 answer
When using the proxy pattern in Python, how can proxy classes access state in the calling object?
In the following code, Graph() is acting as a proxy to Vertex and Edge -- clients only access Vertex and Edge through Graph():
from rest import Resource
from elements import Vertex, Edge
class Graph(object):
def __init__(self,db_url):
…

espeed
- 4,754
- 2
- 39
- 51
0
votes
1 answer
How to Method#getAnnotatedParameterTypes() in spring proxied class
I'm using spring-boot 2+ and created some custom annotation;
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface MyCustomAnnotation{
}
When doing:
final AnnotatedType[] annotatedTypes =…

la00
- 119
- 10
0
votes
1 answer
WCF Proxy Generation Problems
I'm having problems with Proxy Generation in VS2010.
I have created a Client/Server app using WCF and the Pub/Sub pattern particularly. The service works well locally but while I can launch the service on the server and can access it through the…

Chris Allison
- 73
- 1
- 10
0
votes
1 answer
Python object proxy problem: descriptors and @staticmethod
I'm trying to create a proxy (wrapper) object so I can modify behaviour of an already instantiated object. Attributes of a wrapper class are set to a newly generated class (using type) along with attributes of an underlying object, it's done this…

Winand
- 2,093
- 3
- 28
- 48
0
votes
1 answer
How do i get the the full name of the proxyed type for a nhibernate DynamicProxy?
I am using a netdatacontractserializer and a SerializationBinder to create my own runtime types for nhibernate proxies on the client side.
This all works except I am forced to assume that there is only one type by each name in the domain model. i.e.…

Simon
- 33,714
- 21
- 133
- 202
0
votes
1 answer
Help creating a generic WCF service invoker - generics, delegates and lambda
I'm trying to create a generic WCF service invoker utility but my knowledge of generics, delegates and lambda is failing me at the final hurdle.
I want to be able to encapsulate the authentication and expection handling of calling my WCF web…

AlterEgo
- 3
- 2
0
votes
2 answers
How to write a proxy with C#?
i have coding a web application which has multi user. they are select data or insert data every thing is that. But selecting some data need too many time such as using LINQ or mathematical calculation. i thing that:
my user1 :
select * from MyTable…

loki
- 2,926
- 8
- 62
- 115
0
votes
1 answer
Where to set up AutoMapper to convert asmx proxy objects to domain objects?
I am calling a .asmx web service that I have added to a project as a Web Reference.
Any objects that come back from the webservice are in the namespace of the webservice. I would like to use AutoMapper to map these objects to my domain…

ngm
- 7,277
- 1
- 53
- 62
0
votes
1 answer
Wrapping a Vararg Method in ActionScript
I have a vararg method that I'd like to act as a proxy for another vararg method, but I'm not sure how to do it. Here's the basic code:
class MyClass {
public function a(...args:*):* {
// other code
b(args);
// other code
…

benjismith
- 16,559
- 9
- 57
- 80
0
votes
1 answer
PHP observer pattern / magic setter / proxing
I'm looking for a way to monitor when a variable in my class gets set.
For example if I have the following class:
class MyClass {
public $myVariable;
}
And somewhere in my code I do:
$class = new MyClass();
$class->myVariable = "value";
I…

Peeter
- 9,282
- 5
- 36
- 53