public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, Object pObject) throws SAXException { if (pObject instanceof Long) { return new LongTypeSerializer(); } else { return super.getSerializer(pConfig, pObject); } }
@Override public TypeParser getParser(XmlRpcStreamConfig pConfig, NamespaceContextImpl pContext, String pURI, String pLocalName) { if ("".equals(pURI) && NullSerializer.NIL_TAG.equals(pLocalName)) { return new NullParser(); } else if ("i8".equals(pLocalName)) { return new LongTypeParser(); } else { return super.getParser(pConfig, pContext, pURI, pLocalName); } }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @return The result object. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { return getWorkerFactory().getWorker().execute(pRequest); }
protected InputStream getInputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection) throws IOException { InputStream istream = pConnection.newInputStream(); if (pConfig.isEnabledForExtensions() && pConfig.isGzipCompressing()) { istream = new GZIPInputStream(istream); } return istream; }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @return The result object. * @throws XmlRpcException Performing the request failed. */ public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { return getWorkerFactory().getWorker().execute(pRequest); }
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcRequestProcessor server = ((XmlRpcRequestProcessorFactory) pRequest.getConfig()).getXmlRpcServer(); return server.execute(pRequest); } }
/** Creates a new instance. Shortcut for * <pre> * new ClientFactory(pClient, new TypeConverterFactoryImpl()); * </pre> * @param pClient A fully configured XML-RPC client, which is * used internally to perform XML-RPC calls. * @see TypeConverterFactoryImpl */ public ClientFactory(XmlRpcClient pClient) { this(pClient, new TypeConverterFactoryImpl()); }
/** Performs a request with the clients default configuration. * @param pRequest The request being performed. * @param pCallback The callback being notified when the request is finished. * @throws XmlRpcException Performing the request failed. */ public void executeAsync(XmlRpcRequest pRequest, AsyncCallback pCallback) throws XmlRpcException { XmlRpcClientWorker w = (XmlRpcClientWorker) getWorkerFactory().getWorker(); w.execute(pRequest, pCallback); }
/** Called to prepare the output stream, if content length is * required. * @param pConfig The configuration object. * @param pSize The requests size. */ protected OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection, int pSize) throws IOException { return pConnection.newOutputStream(); }
/** * @param pRequest The request object. */ protected XmlRpcHttpRequestConfigImpl newConfig(HttpServletRequest pRequest) { return new XmlRpcHttpRequestConfigImpl(); }
/** Creates a new instance with the given request stream. */ public LocalStreamConnection(XmlRpcStreamRequestConfig pConfig, InputStream pRequest) { config = pConfig; request = pRequest; serverStreamConnection = new LocalServerStreamConnection(); }
protected InputStream getInputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection) throws IOException { InputStream istream = pConnection.newInputStream(); if (pConfig.isEnabledForExtensions() && pConfig.isGzipCompressing()) { istream = new GZIPInputStream(istream); } return istream; }
public Object execute(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcRequestProcessor server = ((XmlRpcRequestProcessorFactory) pRequest.getConfig()).getXmlRpcServer(); return server.execute(pRequest); } }
/** Creates a new instance. Shortcut for * <pre> * new ClientFactory(pClient, new TypeConverterFactoryImpl()); * </pre> * @param pClient A fully configured XML-RPC client, which is * used internally to perform XML-RPC calls. * @see TypeConverterFactoryImpl */ public ClientFactory(XmlRpcClient pClient) { this(pClient, new TypeConverterFactoryImpl()); }
public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, Object pObject) throws SAXException { TypeSerializer ts = super.getSerializer(pConfig, pObject); if (ts == null) { if (pObject instanceof Element) { return serializer; } } return ts; } }
/** Called to prepare the output stream, if content length is * required. * @param pConfig The configuration object. * @param pSize The requests size. */ protected OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection, int pSize) throws IOException { return pConnection.newOutputStream(); }
/** * @param pRequest The request object. */ protected XmlRpcHttpRequestConfigImpl newConfig(HttpServletRequest pRequest) { return new XmlRpcHttpRequestConfigImpl(); }
/** Creates a new instance. Shortcut for * <pre> * new ClientFactory(pClient, new TypeConverterFactoryImpl()); * </pre> * @param pClient A fully configured XML-RPC client, which is * used internally to perform XML-RPC calls. * @see TypeConverterFactoryImpl */ public ClientFactory(XmlRpcClient pClient) { this(pClient, new TypeConverterFactoryImpl()); }
public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig, Object pObject) throws SAXException { TypeSerializer ts = super.getSerializer(pConfig, pObject); if (ts == null) { if (pObject instanceof Element) { return serializer; } } return ts; } }
/** Called to prepare the output stream, if content length is * required. * @param pConfig The configuration object. * @param pSize The requests size. */ protected OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection, int pSize) throws IOException { return pConnection.newOutputStream(); }