org.codehaus.xfire.service
Class OperationInfo

java.lang.Object
  extended by org.codehaus.xfire.AbstractContext
      extended by org.codehaus.xfire.service.OperationInfo
All Implemented Interfaces:
Visitable

public class OperationInfo
extends AbstractContext
implements Visitable

Represents the description of a service operation. An operation has a name, and consists of a number of in and out parameters.

Operations are created using the ServiceInfo.addOperation(java.lang.String, java.lang.reflect.Method) method.

Author:
Dan Diephouse, Arjen Poutsma

Method Summary
 void accept(Visitor visitor)
          Acceps the given visitor.
 FaultInfo addFault(java.lang.String name)
          Adds an fault to this operation.
 MessageInfo createMessage(javax.xml.namespace.QName name)
          Creates a new message.
 java.lang.String getDocumenation()
           
 FaultInfo getFault(java.lang.String name)
          Returns the fault with the given name, if found.
 java.util.Collection getFaults()
          Returns all faults for this operation.
 MessageInfo getInputMessage()
          Returns the input message info.
 java.lang.String getMEP()
          Get the message exchange pattern of this operation.
 java.lang.reflect.Method getMethod()
           
 java.lang.String getName()
          Returns the name of the operation.
 MessageInfo getOutputMessage()
          Returns the output message info.
 javax.xml.namespace.QName getQName()
           
 ServiceInfo getService()
          Returns the service descriptor of this operation.
 boolean hasInput()
           
 boolean hasOutput()
           
 boolean isAsync()
          Whether or not the operation should be invoked asynchronously.
 void removeFault(java.lang.String name)
          Removes a fault from this operation.
 void setAsync(boolean async)
           
 void setDocumenation(java.lang.String documenation)
           
 void setInputMessage(MessageInfo inputMessage)
          Sets the input message info.
 void setMEP(java.lang.String mep)
           
 void setName(java.lang.String name)
          Sets the name of the operation.
 void setOutputMessage(MessageInfo outputMessage)
          Sets the output message info.
 
Methods inherited from class org.codehaus.xfire.AbstractContext
getProperty, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the operation.

Returns:
the name of the operation.

getQName

public javax.xml.namespace.QName getQName()

setName

public void setName(java.lang.String name)
Sets the name of the operation.

Parameters:
name - the new name of the operation.

getMethod

public java.lang.reflect.Method getMethod()

isAsync

public boolean isAsync()
Whether or not the operation should be invoked asynchronously.

Returns:

setAsync

public void setAsync(boolean async)

getMEP

public java.lang.String getMEP()
Get the message exchange pattern of this operation.

Returns:

setMEP

public void setMEP(java.lang.String mep)

getService

public ServiceInfo getService()
Returns the service descriptor of this operation.

Returns:
the service.

createMessage

public MessageInfo createMessage(javax.xml.namespace.QName name)
Creates a new message. This message can be set as either input message or output message.

Parameters:
name - the name of the message.
Returns:
the created message.

getInputMessage

public MessageInfo getInputMessage()
Returns the input message info.

Returns:
the input message info.

setInputMessage

public void setInputMessage(MessageInfo inputMessage)
Sets the input message info.

Parameters:
inputMessage - the input message info.

getOutputMessage

public MessageInfo getOutputMessage()
Returns the output message info.

Returns:
the output message info.

setOutputMessage

public void setOutputMessage(MessageInfo outputMessage)
Sets the output message info.

Parameters:
outputMessage - the output message info.

addFault

public FaultInfo addFault(java.lang.String name)
Adds an fault to this operation.

Parameters:
name - the fault name.

removeFault

public void removeFault(java.lang.String name)
Removes a fault from this operation.

Parameters:
name - the qualified fault name.

getFault

public FaultInfo getFault(java.lang.String name)
Returns the fault with the given name, if found.

Parameters:
name - the name.
Returns:
the fault; or null if not found.

getFaults

public java.util.Collection getFaults()
Returns all faults for this operation.

Returns:
all faults.

accept

public void accept(Visitor visitor)
Acceps the given visitor. Iterates over the input and output messages, if set.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor.

hasOutput

public boolean hasOutput()

hasInput

public boolean hasInput()

getDocumenation

public java.lang.String getDocumenation()

setDocumenation

public void setDocumenation(java.lang.String documenation)


Copyright © 2004-2008. All Rights Reserved.