Package i5.las2peer.communication
Class ListMethodsContent
java.lang.Object
i5.las2peer.communication.ListMethodsContent
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptioncreate a new ListMethodContent as a requestListMethodsContent
(boolean request) create a new ListMethodsContent either as a request or as a response, a response is open for adding methods after creation -
Method Summary
Modifier and TypeMethodDescriptionvoid
add a method to this responsevoid
finalize()
close this response for adding methodsString[]
get a sorted array with all names of methods stored in this answerString[][]
getSortedMethodParameters
(String methodName) get a sorted array of all parameter signatures for the given method nameboolean
is this a request or response message?toString()
get an XML representation of this method list (this class is not xml able since the way back is not implemented (yet?)
-
Constructor Details
-
ListMethodsContent
public ListMethodsContent()create a new ListMethodContent as a request -
ListMethodsContent
public ListMethodsContent(boolean request) create a new ListMethodsContent either as a request or as a response, a response is open for adding methods after creation- Parameters:
request
- If true, this is treated as request or as a response otherwise.
-
-
Method Details
-
addMethod
add a method to this response- Parameters:
m
- A method to add
-
finalize
public void finalize()close this response for adding methods -
getSortedMethodNames
get a sorted array with all names of methods stored in this answer- Returns:
- array with method names
-
getSortedMethodParameters
get a sorted array of all parameter signatures for the given method name- Parameters:
methodName
- A method name- Returns:
- sorted array with all parameter signatures
-
isRequest
public boolean isRequest()is this a request or response message?- Returns:
- true, if this is a request message
-
toXmlString
get an XML representation of this method list (this class is not xml able since the way back is not implemented (yet?)- Returns:
- xml representation
-
toString
-