public String getServiceInvocationListenerClass() { return MBeanUtil.format( config.getInvocationListener() != null ? config.getInvocationListener().getClass().getName() : null ); }
/** * Constructs a new ServiceInvoker. This constructor is used by a dedicated {@link ServiceFactory}. * * @param destination the remote destination of this service (services-config.xml). * @param factory the factory that have called this constructor. * @throws ServiceException if anything goes wrong. */ protected ServiceInvoker(Destination destination, T factory) throws ServiceException { this.destination = destination; this.factory = factory; this.serviceExceptionHandler = factory.getServiceExceptionHandler(); ServiceInvocationListener invocationListener = ((GraniteConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getInvocationListener(); if (invocationListener != null) { this.invocationListeners = new ArrayList<ServiceInvocationListener>(); this.invocationListeners.add(invocationListener); } else this.invocationListeners = null; }
/** * Constructs a new ServiceInvoker. This constructor is used by a dedicated {@link ServiceFactory}. * * @param destination the remote destination of this service (services-config.xml). * @param factory the factory that have called this constructor. * @throws ServiceException if anything goes wrong. */ protected ServiceInvoker(Destination destination, T factory) throws ServiceException { this.destination = destination; this.factory = factory; this.serviceExceptionHandler = factory.getServiceExceptionHandler(); ServiceInvocationListener invocationListener = GraniteContext.getCurrentInstance().getGraniteConfig().getInvocationListener(); if (invocationListener != null) { this.invocationListeners = new ArrayList<ServiceInvocationListener>(); this.invocationListeners.add(invocationListener); } else this.invocationListeners = null; }