org.codehaus.xfire.service
Class ServiceInfo

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

public class ServiceInfo
extends java.lang.Object
implements Visitable

Represents an description of a service. A service consists of a number of OperationInfo objects, a qualified name, and a service class.

Author:
Arjen Poutsma
See Also:
OperationInfo

Constructor Summary
ServiceInfo(javax.xml.namespace.QName name, java.lang.Class serviceClass)
          Initializes a new instance of the ServiceInfo class with the given qualified name and service class.
 
Method Summary
 void accept(Visitor visitor)
          Acceps the given visitor.
 OperationInfo addOperation(java.lang.String name, java.lang.reflect.Method method)
          Adds an operation to this service.
 javax.xml.namespace.QName getName()
          Returns the qualified name of the service descriptor.
 OperationInfo getOperation(java.lang.String name)
          Returns the operation info with the given name, if found.
 OperationInfo getOperationByAction(java.lang.String name)
          Returns the operation info with the given action, if found.
 java.util.Collection getOperations()
          Returns all operations for this service.
 java.lang.Class getServiceClass()
          Returns the service class of the service descriptor.
 void removeOperation(java.lang.String name)
          Removes an operation from this service.
 void setName(javax.xml.namespace.QName name)
          Sets the qualified name of the service descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceInfo

public ServiceInfo(javax.xml.namespace.QName name,
                   java.lang.Class serviceClass)
Initializes a new instance of the ServiceInfo class with the given qualified name and service class.

Parameters:
name - the qualified name.
serviceClass - the service class.
Method Detail

accept

public void accept(Visitor visitor)
Acceps the given visitor. Iterates over all operation infos.

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

addOperation

public OperationInfo addOperation(java.lang.String name,
                                  java.lang.reflect.Method method)
Adds an operation to this service.

Parameters:
name - the qualified name of the operation.
Returns:
the operation.

getName

public javax.xml.namespace.QName getName()
Returns the qualified name of the service descriptor.

Returns:
the qualified name.

setName

public void setName(javax.xml.namespace.QName name)
Sets the qualified name of the service descriptor.

Parameters:
name - the new qualified name.

getOperation

public OperationInfo getOperation(java.lang.String name)
Returns the operation info with the given name, if found.

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

getOperationByAction

public OperationInfo getOperationByAction(java.lang.String name)
Returns the operation info with the given action, if found.

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

getOperations

public java.util.Collection getOperations()
Returns all operations for this service.

Returns:
all operations.

getServiceClass

public java.lang.Class getServiceClass()
Returns the service class of the service descriptor.

Returns:

removeOperation

public void removeOperation(java.lang.String name)
Removes an operation from this service.

Parameters:
name - the operation name.


Copyright © 2004-2005 Codehaus. All Rights Reserved.