T
- the type managed by this Proxy
public class Proxy<T>
extends java.lang.Object
public class MyProxy extends Proxy<MySharedInterface> implements MySharedInterface{ public void foo(){ try{ invoke(); } catch(Throwable e){ // return or throw default case (deny of service) } }A
Proxy
instance has a link to a reference owned by another Feature
.
The reference may be automatically removed by the garbage collector.Constructor and Description |
---|
Proxy()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
getReference()
Returns the reference managed by this
Proxy . |
protected void |
invoke()
This method has for effect to invoke the same method on the reference.
|
protected boolean |
invokeBoolean()
This method has for effect to invoke the same method on the reference.
|
protected byte |
invokeByte()
This method has for effect to invoke the same method on the reference.
|
protected char |
invokeChar()
This method has for effect to invoke the same method on the reference.
|
protected double |
invokeDouble()
This method has for effect to invoke the same method on the reference.
|
protected float |
invokeFloat()
This method has for effect to invoke the same method on the reference.
|
protected int |
invokeInt()
This method has for effect to invoke the same method on the reference.
|
protected long |
invokeLong()
This method has for effect to invoke the same method on the reference.
|
protected java.lang.Object |
invokeRef()
This method has for effect to invoke the same method on the reference.
|
protected short |
invokeShort()
This method has for effect to invoke the same method on the reference.
|
protected final void invoke() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final boolean invokeBoolean() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final byte invokeByte() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final char invokeChar() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final short invokeShort() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final int invokeInt() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final long invokeLong() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final float invokeFloat() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final double invokeDouble() throws java.lang.Throwable
java.lang.Throwable
- any kind of exceptions must be catched by the callerprotected final java.lang.Object invokeRef() throws java.lang.Throwable
Object
result of the call of the target methodjava.lang.Throwable
- any kind of exceptions must be catched by the caller