throws Throwable String type = invocation.getType(); String name = invocation.getName(); Object args[] = invocation.getArgs(); Object retn = invocation.getReturnTypeClass(); Object args[] = invocation.getArgs(); Object retn = invocation.getReturnTypeClass(); Interceptor next = invocation.nextInterceptor(); if (next != null) return invocation.dispatch();
public Invocation(InvocationContext ic) { addContext(ic); }
public Object invoke(Invocation invocation) throws Throwable { if( callback == null ) { lazyInit(invocation); } Object returnValue = invocation.nextInterceptor().invoke(invocation); String type = invocation.getType(); if (type != Invocation.OP_SETATTRIBUTE ) return returnValue; String attrName = invocation.getName(); String policy = (String)attrPersistencePolicies.get(attrName); if (policy == null) policy = mbeanPersistencePolicy; if (policy.equalsIgnoreCase(PP_ON_UPDATE) == true) { MBeanInvoker invoker = invocation.getInvoker(); Descriptor attrDesc = invocation.getDescriptor(); invoker.updateAttributeInfo(attrDesc); callback.store(); } else if(policy.equalsIgnoreCase(PP_NO_MORE_OFTEN_THAN) == true) { PersistenceTimerTask task = (PersistenceTimerTask) timerTaskMap.get(attrName); if( task != null ) task.setHasUpdated(true); } return returnValue; }
public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(getName()); String[] sig = getSignature(); if (sig != null) buffer.append(Arrays.asList(sig)); buffer.append(' ').append(getType()); return buffer.toString(); }
public Object invoke() throws Throwable { AbstractInterceptor ic = nextInterceptor(); if (ic == null) return dispatch(); else return ic.invoke(this); }
public Object invoke(Invocation invocation) throws Throwable { // Invoke the next in the sequence Object result = invocation.nextInterceptor().invoke(invocation); // If the invocation was an 'invoke(MarshalledInvocation)' // filter the result using the plugable policy if ("invoke".equals(invocation.getName())) { Object[] args = invocation.getArgs(); if ((args.length == 1) && (args[0] instanceof MarshalledInvocation)) { MarshalledInvocation mi = (MarshalledInvocation) args[0]; result = policy.filter(mi, result); } } return result; }
Invocation invocation = new Invocation(); invocation.addContext(ctx); invocation.setType(InvocationContext.OP_INVOKE); invocation.setName(operationName); invocation.setArgs(args); return invocation.invoke(); Descriptor descriptor = invocation.getDescriptor(); if (descriptor != null) invocation.setArgs(null); invocation.setDescriptor(null); invocation.setDispatcher(null);
public Object invoke(Invocation invocation) throws Throwable Descriptor d = invocation.getDescriptor(); Class clazz = invocation.getAttributeTypeClass(); objectName = invocation.getInvoker().getObjectName(); if (invocation.getType().equals(Invocation.OP_SETATTRIBUTE)) Object value = invocation.getArgs() [0]; if (trace) log.trace("Setting objectName=" + objectName + " attr=" + name + " value=" + value); invocation.invoke(); ModelMBeanInvoker invoker = (ModelMBeanInvoker) invocation.getInvoker(); invoker.sendAttributeChangeNotification( new Attribute(invocation.getName(), oldValue), new Attribute(invocation.getName(), value) ); return null; else if (invocation.getType().equals(Invocation.OP_GETATTRIBUTE)) Object value = invocation.invoke(); if (trace) log.trace("Got attribute objectName=" + objectName + " attr=" + name + " value=" + value); throw new UnreachableStatementException(invocation.getType());
Invocation invocation = new Invocation(); invocation.addContext(ctx); invocation.setType(InvocationContext.OP_GETATTRIBUTE); invocation.setArgs(null); return invocation.invoke(); Descriptor attrDesc = invocation.getDescriptor(); ctx.setDescriptor(attrDesc); updateAttributeInfo(attrDesc);
String type = invocation.getType(); if (type == Invocation.OP_INVOKE) String opName = invocation.getName(); if (opName.equals("invoke")) Object[] args = invocation.getArgs(); org.jboss.invocation.Invocation inv = (org.jboss.invocation.Invocation) args[0]; Interceptor i = invocation.nextInterceptor(); return i.invoke(invocation);
public Object invoke(Invocation invocation) throws Throwable Object target = invocation.getTarget(); String operationName = invocation.getName(); if (dynamic) Descriptor descriptor = invocation.getDescriptor(); if (descriptor != null) try sig = invocation.getSignatureClasses(); + " on resource: " + invocation.getInvoker().getResource() + " objectName: " + invocation.getInvoker().getObjectName(); throw new ReflectionException(new NullPointerException(msg)); Object[] args = invocation.getArgs(); return invokeMethod.invoke(target, args);
Object target = invocation.getTarget(); Object[] args = invocation.getArgs(); if (dynamic) Descriptor d = invocation.getDescriptor(); if (d != null) if (getMethodString != null && (getMethod == null || getMethodString.equals(getMethod.getName()) == false)) MBeanInvoker invoker = invocation.getInvoker(); Object object = invoker.invoke(getMethodString, new Object[0], new String[0]); checkAssignable(getMethodString, invocation.getAttributeTypeClass(), object); return object; if (dynamic) Descriptor d = invocation.getDescriptor(); if (d != null) if (setMethodString != null && (setMethod == null || setMethodString.equals(setMethod.getName()) == false)) MBeanInvoker invoker = invocation.getInvoker(); return invoker.invoke(setMethodString, new Object[] { args[0] }, new String[] { invocation.getAttributeType() });
public Object invoke(Invocation invocation) throws Throwable Descriptor d = invocation.getDescriptor(); Class<?> clazz = invocation.getReturnTypeClass(); objectName = invocation.getInvoker().getObjectName(); Object args = invocation.getArgs(); if (args != null) args = Arrays.asList((Object[]) args); Object value = invocation.invoke(); if (trace) log.trace("Got result objectName=" + objectName + " oper=" + name + " value=" + value);
public MBeanInfo getMBeanInfo() Invocation invocation = new Invocation(getMBeanInfoCtx); invocation.setType(InvocationContext.OP_GETMBEANINFO); MBeanInfo info = (MBeanInfo) invocation.invoke(); return info;
public Object invoke(Invocation invocation) throws Throwable { Object value = invocation.nextInterceptor().invoke(invocation); if( value instanceof NamingContext ) { initNamingProxy(); NamingContext ctx = (NamingContext) value; ctx.setNaming(proxy); } return value; }
protected void override(Invocation invocation) throws MBeanException { // Do we allow for dynamic descriptor changes if (dynamicResource && info != null) { Descriptor current = invocation.getDescriptor(); if (current != null) { ModelMBeanInfo mminfo = (ModelMBeanInfo) info; Descriptor descriptor = mminfo.getDescriptor((String) current.getFieldValue(NAME), (String) current.getFieldValue(DESCRIPTOR_TYPE)); if (descriptor != null) invocation.setDescriptor(descriptor); } } }
public Object invoke(Invocation invocation) throws Throwable { Object[] args = invocation.getArgs(); setManagedResource(args[0], (String) args[1]); return null; } });
Invocation invocation = new Invocation(); invocation.addContext(ctx); invocation.setType(InvocationContext.OP_INVOKE); invocation.setName(operationName); invocation.setArgs(args); return invocation.invoke(); Descriptor descriptor = invocation.getDescriptor(); if (descriptor != null) invocation.setArgs(null); invocation.setDescriptor(null); invocation.setDispatcher(null);
public Object invoke(Invocation invocation) throws Throwable Descriptor d = invocation.getDescriptor(); Class<?> clazz = invocation.getAttributeTypeClass(); objectName = invocation.getInvoker().getObjectName(); if (invocation.getType().equals(Invocation.OP_SETATTRIBUTE)) Object value = invocation.getArgs() [0]; if (trace) log.trace("Setting objectName=" + objectName + " attr=" + name + " value=" + value); invocation.invoke(); ModelMBeanInvoker invoker = (ModelMBeanInvoker) invocation.getInvoker(); invoker.sendAttributeChangeNotification( new Attribute(invocation.getName(), oldValue), new Attribute(invocation.getName(), value) ); return null; else if (invocation.getType().equals(Invocation.OP_GETATTRIBUTE)) Object value = invocation.invoke(); if (trace) log.trace("Got attribute objectName=" + objectName + " attr=" + name + " value=" + value); throw new UnreachableStatementException(invocation.getType());
Invocation invocation = new Invocation(); invocation.addContext(ctx); invocation.setType(InvocationContext.OP_GETATTRIBUTE); invocation.setArgs(null); return invocation.invoke(); Descriptor attrDesc = invocation.getDescriptor(); ctx.setDescriptor(attrDesc); updateAttributeInfo(attrDesc);