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
2
votes
1 answer
PromiseProxy Service with Ember Data query
I'm trying to setup a PromiseProxy Service that returns an Ember Data model, but the result doesn't seem to set the content property.
My service looks like this:
import Ember from 'ember';
const { computed, inject, ObjectProxy, PromiseProxyMixin }…

knownasilya
- 5,998
- 4
- 36
- 59
2
votes
2 answers
Hide to the rest of the world some methods used only by internal classes
Short question
I have one C++ domain model. It has some methods used by the internal API as well as other public methods. I don't want to expose those API methods. I'm thinking of using the proxy pattern to hide those methods. Do you think this is a…

user427569
- 143
- 2
- 11
2
votes
1 answer
Java - Using Proxy Classes
So I have a couple of classes ClassA through ClassC (not implemented by myself, so I can't modify their source). Each class implements some common functions, and some unique ones. These classes are used to provide different types of authentication…

AweSIM
- 1,651
- 4
- 18
- 37
2
votes
3 answers
Message queue proxy in Python + Twisted
I want to implement a lightweight Message Queue proxy. It's job is to receive messages from a web application (PHP) and send them to the Message Queue server asynchronously. The reason for this proxy is that the MQ isn't always avaliable and is…

gasper_k
- 1,098
- 1
- 7
- 11
2
votes
0 answers
How do I make a numpy array proxy object? Is there a mixin class?
Currently my code looks like this:
class GradientDescent:
def __init__(self, shape, log_space=False):
"""
* log_space puts the weights in log space automatically.
"""
super().__init__()
self.w =…

Neil G
- 32,138
- 39
- 156
- 257
2
votes
1 answer
Does C++11's && (R-value reference) operator obsolete the 'proxy-object' design-pattern?
Item 30 of Scott Meyers' "more effective C++" maps out a 'proxy object' programming design-pattern.
The problem is if you have:
X x;
x[3]=42;
cout<

P i
- 29,020
- 36
- 159
- 267
2
votes
1 answer
Java RMI: Pass remote object reference back to host
My client uses RMI to connect to a service on a different host.
This client calls a method on the service that returns a remote object reference. Can the client pass the associated stub to a different method of the service in a way that is…

Simon Slangen
- 60
- 7
2
votes
1 answer
2
votes
1 answer
Object hierarchy returned by WCF Service is different than expected
My understanding may be wrong, but I thought once you applied the correct attributes the DataContractSerializer would render fully-qualified instances back to the caller.
The code runs and the objects return. But oddly enough, once I look at the…

Prisoner ZERO
- 13,848
- 21
- 92
- 137
2
votes
1 answer
Thin proxy class for hashables
I need some kind of thin wrapper object to mark dictionary keys, like:
d = {
Required('name'): str,
Optional('age'): int,
}
And these wrappers should behave like the wrapped object (comparison, hashing, etc):
marked = Required('name')
marked ==…

kolypto
- 31,774
- 17
- 105
- 99
2
votes
1 answer
Why is proxying deprecated?
This question about how to extend a Scala collection led me to this answer, which extends from SetProxy rather than Set. But SetProxy has since been deprecated! The documentation says "(Since version 2.11.0) Proxying is deprecated due to lack of use…

Ben Kovitz
- 4,920
- 1
- 22
- 50
2
votes
2 answers
What's the name of this design pattern? Façade, adapter, bridge, proxy?
In one of my projects, I'm using the following pattern at several places: I have a class A with a bunch of methods, and class B which gets constructed with a pointer to some instance of A, exporting only a subset of those methods for a user (which…

eepp
- 7,255
- 1
- 38
- 56
2
votes
0 answers
Duplicate type name exception in System.Reflection.Emit when debugging in VisualStudio
My project uses Code First Entity Framework (Version 6).
My entity classes implement navigation properties as virtual properties.
This must mean that EF built proxy classes using ReflectionEmit.
This works fine if I execute the application normally.…

nlips
- 1,258
- 9
- 25
2
votes
2 answers
building a 'simple' php url proxy
I need to implement a simple PHP proxy in a web application I am building (Its flash based and the destination service provider doesn't allow edits to their crossdomain.xml file)
Can any php gurus offer advice on the following 2 options? Also, I…

Bachalo
- 6,965
- 27
- 95
- 189
2
votes
1 answer
Proxying with Generics
I use java.lang.reflect.Proxy to proxy objects.
I have this class:
public class TransportableImpl extends Transportable{
public class OrderInvoker extends InvocationHandler{
...
}
}
Here i build the Proxy:
Transportable t = new…

Grim
- 1,938
- 10
- 56
- 123