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
0
votes
2 answers

Actionscript - How to override getting pre-defined properties of classes?

I have a class which extends the Proxy class, and has a statically defined member variable called num: public dynamic class TestProxy extends Proxy { private var num:Number = 100; public function TestProxy() { super(); } override…
Fragsworth
  • 33,919
  • 27
  • 84
  • 97
0
votes
1 answer

Visual Studio 2008 web reference proxy class doesn't decode xml attribute

I have a following issue: I am writing client code for consumation of a web service. Here is the answer from the web service: HTTP/1.0 200 OK Content-Type: text/xml; charset=utf-8 Connection: close
Bogi
  • 2,274
  • 5
  • 26
  • 34
0
votes
0 answers

Conditionally calling property/methods on classes

I have a custom Array type class in Typescript. I didn't extend it because of the difficulties that comes with that, so I just use a private array which I have to directly reference each time I want to use an array method. export class…
0
votes
1 answer

Wrapper (proxy) in golang

When I read article https://upgear.io/blog/golang-tip-wrapping-http-response-writer-for-middleware/?utm_source=golangweekly&utm_medium=email, I realize that is easy to make a wrapper (design pattern Proxy), that wrap some methods. Situation is bit…
lofcek
  • 1,165
  • 2
  • 9
  • 18
0
votes
2 answers

Creating Proxy/Mock Object From/Of Generic Type

I would like to implement the following method: public static T CreateProxyObject(Dictionary setup) With the following Rules: 1) I want to stay as generic as possible means T is not known during compile time and I want to be able…
CountOren
  • 844
  • 1
  • 9
  • 27
0
votes
0 answers

In Proxy how to tell if user is expecting promise?

I have setup a proxy to "promisify" callbacked functions like this: const browser = new Proxy({}, { get: function(target, name, receiver) { return function(...args) { if (userExpectsPromise) { // how to detect this? …
Noitidart
  • 35,443
  • 37
  • 154
  • 323
0
votes
0 answers

Proxy object ClassCastException

I'm trying to load external classes dynamically in an Android app, using a proxy object to intercept calls to the methods. For definition, for use a proxy object, classes must implement an interface. I thought if I create a proxy with an interface I…
Angel C
  • 31
  • 4
0
votes
1 answer

cast closure map to object with a private constructor in groovy

I am using groovy to create some mock classes for a test case. I am basically creating dummy objects where all the methods return null so that i can run my testcase. I am using the following syntax: MessageFactory.instance = ["getMessage": {a,b,c,d…
mkoryak
  • 57,086
  • 61
  • 201
  • 257
0
votes
1 answer

Proxy usage messes up function.caller.name

I am trying to mimic a more class-like inheritance model using JavaScript, but I hit a problem when trying to mix this with the idea of JavaScript Proxies. To make a long story short, in the definition of my Class type I have a function _super()…
ACEG
  • 1,981
  • 6
  • 33
  • 61
0
votes
1 answer

How to get the real object when receiving a proxy as parameter through an RMI Call?

I have a Server and a Client communicating using RMI, and I have several classes implementing the Remote interface. The client receives the proxies with no problems, but when I send one of this proxy objects as a parameter of another RMI method…
Gustavo
  • 195
  • 2
  • 11
0
votes
0 answers

Entity Framework 6 - Always update properties that were manually setted by code - Change behavior of change tracker in proxy classes

This is Entity Framework 6.1.3 with .NET v4.0 and SQL Server 2008 R2. In my, DB I have hundreds of tables with column LastChangedByUser in which I store the login of the user who last updated the row. Unfortually, I have legacy triggers FOR UPDATE…
0
votes
1 answer

Specializing a QAbstractProxyModel for adding a column: the table cells becomes empty

I have created a mixin-like proxy model (Qt5) which just adds an extra first column to another proxy model, for adding a QToolBar of actions to each row of the table view (for example, a "delete" button). The model just provides a way of populating…
ABu
  • 10,423
  • 6
  • 52
  • 103
0
votes
1 answer

Re-use a WebService but with custom endpoint

I'm using a Web Service that has a endpoint of http://api.domain_a.com/ and using Visual Studio I can easily generate a proxy class to work with the service easy and simple. But I want to create a way that users can use their own service (and…
balexandre
  • 73,608
  • 45
  • 233
  • 342
0
votes
2 answers

Multiple Object wrappers in TypeScript/JavaScript

I have an interface MyInterface and a concrete implementation MyImplementation that implements the interface. Now I need to create multiple "Wrappers" that should also implement MyInterface and will be wrapping the original MyImplementation object.…
Dynalon
  • 6,577
  • 10
  • 54
  • 84
0
votes
1 answer

Good usage of managed entities / proxies with ORM

I'm currently thinking about how i handle my domain objects along with hibernate considering the following : My model object are directly annotated with JPA annotation, no entity layer. On some database heavy operation, i don't mind tuning my code…
Walfrat
  • 5,363
  • 1
  • 16
  • 35