Questions tagged [proxy-classes]

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.

342 questions
1
vote
1 answer

Implementing a custom model binder in MVC to resolve types from container

In a nutshell, my question boils down to this: I need to implement a custom model binder in MVC4 that resolves models from container/service locator, whatever. I have implemented the following model binder: public class ServiceLocatorModelBinder :…
1
vote
2 answers

Check the state validity of a Spring proxied bean without try-catch

I have a bean being created by a service with the following class: @Configuration public class AccessManager { @Bean(name="access", destroyMethod="destroy") @Scope(value="session", proxyMode=ScopedProxyMode.TARGET_CLASS) @Autowired …
Caio Cunha
  • 23,326
  • 6
  • 78
  • 74
1
vote
3 answers

How do I use a common class between winforms client and web service?

I have inherited a large admin winforms application that shares a 'Common' library of classes for holding data with a web service. The problem I am having is that if I return a populated instance of a class from a web service call then it comes out…
Ryan O'Neill
  • 5,410
  • 4
  • 46
  • 69
1
vote
0 answers

Spring: How to return a httpinvoker-proxy class by a httpinvokerservice

I have a small application server (tomcat) with spring and a HttpInvokationServiceExporter. This classes are on Server: public interface IAccount{ public IUser getUser(); } public class Account implements IAccount{ private IUser user; …
PhilippBüch
  • 127
  • 1
  • 1
  • 7
1
vote
1 answer

Could we say that Java Proxies work as delegators?

The aim behind asking this question is to improve my understanding of Java Proxies and delegation in general.
Jayant
  • 529
  • 1
  • 5
  • 13
1
vote
2 answers

In python, how can I get functions such as repr() to work with my proxy class?

I have devised a proxy class that allows me to replace any type/class with a factory method and still retain most of the functionality of the class object. Here is a sample of how it works: class ProxyClass: def __init__(self, cls): …
Matt
  • 21,026
  • 18
  • 63
  • 115
1
vote
1 answer

how is seam proxying classes

seam actually proxies every class for interception. is there a difference between proxied classes and proxied classes that implement interfaces?? f.e. like in spring where a proxy instance is made implementing all interfaces specified in the…
Raffael Schmid
  • 329
  • 1
  • 7
1
vote
1 answer

Types name in XSD doesn't match in proxy

I’ve getting a very strange behavior when generating my proxy from XSD. Let suppose I’ve following XSD (assume schema tag already placed). I'm using Add Service Reference option to generate proxy.
Rizwan
  • 119
  • 1
  • 9
0
votes
1 answer

Extending 3rd party class as Hadoop Writable with proxy

I have a third-party class that I am trying to use in Hadoop, and thus need to make have it implement Writable. The problem is that the way Hadoop uses Writable is to create an object o = SomeObject(), then call o.readFields(in) to de-serialize, and…
Noah Watkins
  • 5,446
  • 3
  • 34
  • 47
0
votes
1 answer

Get WCF server raw response in svcutil generated proxy class

Is it possible to prevent deserialization, or to have access to Operation result class of webmethod in generated proxy class without writing your own proxy class? Thanks.
Johnny_D
  • 4,592
  • 3
  • 33
  • 63
0
votes
1 answer

Proxy Types and Foreign Keys in Django

Is it possible to use proxy model instances for a foreign key? Are there any downsides or risks to doing this? Sample code: base_models.py class BaseWidget(models.Model): name = models.CharField(max_length=100) code =…
Jordan Reiter
  • 20,467
  • 11
  • 95
  • 161
0
votes
4 answers

Framework for ASP.NET data-binding wrapper classes

Apparently ASP.NET doesn't allow data-binding to dynamic objects. Major bummer, because I could see a syntax like this being really useful: public class User { public string FirstName { get; set; } public string LastName { get; set;…
David Boike
  • 18,545
  • 7
  • 59
  • 94
0
votes
3 answers

Simple logging object

I have some python module, which has a class ModuleClass and I can't modify that class. Now, I want to be able to proxify the method calls and add certain logging features. I assume this should be done via forwarding object and the corresponding…
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
0
votes
3 answers

How to implement an equality operator function for a proxy class

I have a class Date that I defined that models a date, it has a day,month and a year as data members. Now to compare the dates I created the equality operator bool Date::operator==(const Date&rhs) { return (rhs.day()==_day && _month==rhs.month()…
Obakeng
  • 33
  • 6
0
votes
0 answers

Symfony Doctrine entities disable Proxy (while Xdebugging)

Whenever I use Xdebug to debug variables I see alot of Proxies\__CG__\ classes instead of my real classes. Is there any way to disable these? I want to eager load everything instead of lazy loading. These Proxy (entity) classes have every property…
sbkevin
  • 11
  • 1
  • 3