Package com.sun.xml.ws.xmlfilter
Class Invocation
java.lang.Object
com.sun.xml.ws.xmlfilter.Invocation
The class represents a wrapper around
XMLStreamWriter invocations.- Author:
- Marek Potociar (marek.potociar at sun.com)
-
Method Summary
Modifier and TypeMethodDescriptionMethod returnsStringrepresentation of arguments stored in theInvocationinstance.static InvocationcreateInvocation(Method method, Object[] args) Factory method that createsInvocationinstance according to input argumentsexecute(XMLStreamWriter target) Executes the method ontargetXMLStreamWriterinstance.static voidexecuteBatch(XMLStreamWriter target, Queue<Invocation> batch) Method executes queue of invocations.getArgument(int index) Returns single invocation argument for thisInvocationinstance that is stored in the invocation arguments array at position determined byindexargument.intReturns information about the number of arguments stored in thisInvocationinstanceReturns information about the name of the method represented by thisInvocationinstanceReturns information about the type of the method represented by thisInvocationinstancetoString()Method returnsStringrepresentation of theInvocationinstance.
-
Method Details
-
createInvocation
Factory method that createsInvocationinstance according to input arguments- Parameters:
method- method represented by theInvocationinstance returned as a result of this factory method callargs- invocation arguments to be passed to the method whenexecuteBatch(javax.xml.stream.XMLStreamWriter, java.util.Queue)method is invoked on theInvocationinstance.- Returns:
- the
Invocationinstance representing invocation of method defined by value ofmethodargument.
-
executeBatch
public static void executeBatch(XMLStreamWriter target, Queue<Invocation> batch) throws InvocationProcessingException Method executes queue of invocations. All invocations must represent methods withvoidreturn type. After succesful invocation of the whole batch, the batch queue is fully consumed and empty.- Parameters:
target- XmlStreamWriter used for invocation queue executionbatch- queue of invocations to be executed on the targeted XmlStreamWriter. After successful invocation of the whole batch, the batch queue is fully consumed and empty.- Throws:
InvocationProcessingException
-
getMethodName
Returns information about the name of the method represented by thisInvocationinstance- Returns:
- method name represented by this
Invocationinstance
-
getMethodType
Returns information about the type of the method represented by thisInvocationinstance- Returns:
- method type represented by this
Invocationinstance - See Also:
-
getArgument
Returns single invocation argument for thisInvocationinstance that is stored in the invocation arguments array at position determined byindexargument.- Returns:
- single invocation argument for this
Invocationinstance at position determined byindexargument - Throws:
ArrayIndexOutOfBoundsException- if there are no arguments in the array or if the index parameter is out of bounds of invocation arguments array
-
getArgumentsCount
public int getArgumentsCount()Returns information about the number of arguments stored in thisInvocationinstance- Returns:
- number of arguments stored in this
Invocationinstance
-
execute
Executes the method ontargetXMLStreamWriterinstance.- Returns:
- execution result.
- Throws:
InvocationProcessingException- wraps underlying exception - seeMethod.invoke().
-
toString
Method returnsStringrepresentation of theInvocationinstance.- Overrides:
toStringin classObject- Returns:
Stringrepresentation of theInvocationinstance.
-
argsToString
Method returnsStringrepresentation of arguments stored in theInvocationinstance.- Returns:
Stringrepresentation of arguments stored in theInvocationinstance.
-