org.apache.wsrp4j.consumer
Interface Producer

All Known Implementing Classes:
ProducerImpl

public interface Producer

A consumer representation of a WSRP-producer providing WSRP-portlets. Generally a producer can expose up to four WSRP-Interfaces. These interfaces are Markup-, Service Description-,Registration- and Portlet Management Interface. Whereas the Registration- and Portlet Management Interface are optional.

Author:
Stephan Laertz

Method Summary
 void addPortletDescription(PortletDescription portletDescription)
          Add an portlet description to the producer.
 ReturnAny deregister()
          End an existing consumer producer relationship and remove the registration context
 java.lang.String getDescription()
          Get a description of the producer.
 java.lang.String getID()
          Get the ID of the producer.
 java.lang.String getMarkupInterfaceEndpoint()
          Get the URL of the producers markup interface.
 java.lang.String getName()
          Get the name of the producer.
 PortletDescription getPortletDescription(java.lang.String portletHandle)
          Get the portlet description of the portlet with the given handle or null if the producer doesn't know an portlet with this handle.
 WSRP_v1_PortletManagement_PortType getPortletManagementInterface()
          Get the producers portlet management interface.
 java.lang.String getPortletManagementInterfaceEndpoint()
          Get the URL of the producers portlet management interface.
 RegistrationContext getRegistrationContext()
          Get the current registration context of the consumer registered at this producer or null if no registration is required or happend so far.
 RegistrationData getRegistrationData()
          Get the registration data the consumer uses to register at this producer.
 WSRP_v1_Registration_PortType getRegistrationInterface()
          Get the producers registration interface.
 java.lang.String getRegistrationInterfaceEndpoint()
          Get the URL of the producers registration interface.
 ServiceDescription getServiceDescription()
          Same as getServiceDescription(false)
 ServiceDescription getServiceDescription(boolean newRequest)
          Get the service description of the producer
 WSRP_v1_ServiceDescription_PortType getServiceDescriptionInterface()
          Get the producers service description interface.
 java.lang.String getServiceDescriptionInterfaceEndpoint()
          Get the URL of the producers service description interface.
 boolean isPortletManagementInferfaceSupported()
          Check wether the optional portlet management interface is supported
 boolean isRegistrationInterfaceSupported()
          Check wether the optional registration interface is supported
 boolean isRegistrationRequired()
          Indicates wether or not the producer requires consumer registration.
 RegistrationState modifyRegistration(RegistrationData registrationData)
          Can be used to modify the relationship between consumer and producer.
 RegistrationContext register(RegistrationData registrationData)
          Method establishes a relationship between consumer and producer.
 void setDescription(java.lang.String description)
          Set a description of the producer.
 void setID(java.lang.String id)
          Set the ID of the producer to he given value.
 void setIsRegistrationRequired(boolean registrationRequired)
          Define if the producer requires in-band registration or not.
 void setMarkupInterfaceEndpoint(java.lang.String url)
          Set the URL of the producers markup interface.
 void setName(java.lang.String name)
          Set the name of the producer.
 void setPortletManagementInterfaceEndpoint(java.lang.String url)
          Set the URL of the producers portlet management interface.
 void setRegistrationContext(RegistrationContext registrationContext)
          Set the registration context.
 void setRegistrationData(RegistrationData regData)
          Set the registration the consumer uses the register at this producer.
 void setRegistrationInterfaceEndpoint(java.lang.String url)
          Set the URL of the producers registration interface.
 void setServiceDescriptionInterfaceEndpoint(java.lang.String url)
          Set the URL of the producers service description interface.
 

Method Detail

getName

java.lang.String getName()
Get the name of the producer.

Returns:
The name of the producer

setName

void setName(java.lang.String name)
Set the name of the producer.

Parameters:
name - The name of the producer

getID

java.lang.String getID()
Get the ID of the producer.

Returns:
The ID of the producer

setID

void setID(java.lang.String id)
Set the ID of the producer to he given value.

Parameters:
id - ID of the producer.

getDescription

java.lang.String getDescription()
Get a description of the producer.

Returns:
A description of the producer

setDescription

void setDescription(java.lang.String description)
Set a description of the producer.

Parameters:
description - Some descriptive information about the producer

getServiceDescriptionInterfaceEndpoint

java.lang.String getServiceDescriptionInterfaceEndpoint()
Get the URL of the producers service description interface.

Returns:
URL of the service description interface.

setServiceDescriptionInterfaceEndpoint

void setServiceDescriptionInterfaceEndpoint(java.lang.String url)
Set the URL of the producers service description interface.

Parameters:
url - of the service description interface.

getServiceDescriptionInterface

WSRP_v1_ServiceDescription_PortType getServiceDescriptionInterface()
Get the producers service description interface.

Returns:
service description interface.

getMarkupInterfaceEndpoint

java.lang.String getMarkupInterfaceEndpoint()
Get the URL of the producers markup interface.

Returns:
URL of the markup interface.

setMarkupInterfaceEndpoint

void setMarkupInterfaceEndpoint(java.lang.String url)
Set the URL of the producers markup interface.

Parameters:
url - of the markup interface.

getPortletManagementInterfaceEndpoint

java.lang.String getPortletManagementInterfaceEndpoint()
Get the URL of the producers portlet management interface.

Returns:
URL of the portlet management interface.

setPortletManagementInterfaceEndpoint

void setPortletManagementInterfaceEndpoint(java.lang.String url)
Set the URL of the producers portlet management interface.

Parameters:
url - of the portlet management interface.

getPortletManagementInterface

WSRP_v1_PortletManagement_PortType getPortletManagementInterface()
Get the producers portlet management interface.

Returns:
portlet management interface.

getRegistrationInterfaceEndpoint

java.lang.String getRegistrationInterfaceEndpoint()
Get the URL of the producers registration interface.

Returns:
URL of the registration interface.

setRegistrationInterfaceEndpoint

void setRegistrationInterfaceEndpoint(java.lang.String url)
Set the URL of the producers registration interface.

Parameters:
url - of the registration interface.

getRegistrationInterface

WSRP_v1_Registration_PortType getRegistrationInterface()
Get the producers registration interface.

Returns:
registration interface.

isRegistrationRequired

boolean isRegistrationRequired()
Indicates wether or not the producer requires consumer registration.

Returns:
True if consumer registration is required.

setIsRegistrationRequired

void setIsRegistrationRequired(boolean registrationRequired)
Define if the producer requires in-band registration or not.

Parameters:
registrationRequired - True if the producer requires in-band registration

getRegistrationData

RegistrationData getRegistrationData()
Get the registration data the consumer uses to register at this producer.

Returns:
The consumer registration data

setRegistrationData

void setRegistrationData(RegistrationData regData)
Set the registration the consumer uses the register at this producer.

Parameters:
regData - The registration data which is used to register at this producer

getServiceDescription

ServiceDescription getServiceDescription(boolean newRequest)
                                         throws WSRPException
Get the service description of the producer

Parameters:
newRequest - If set to true a new request is send to the producer otherwise a cached service description is used if available
Returns:
Service description of the producer
Throws:
WSRPException

getServiceDescription

ServiceDescription getServiceDescription()
                                         throws WSRPException
Same as getServiceDescription(false)

Throws:
WSRPException

getPortletDescription

PortletDescription getPortletDescription(java.lang.String portletHandle)
                                         throws WSRPException
Get the portlet description of the portlet with the given handle or null if the producer doesn't know an portlet with this handle.

Parameters:
portletHandle - The portlet handle of the portlet
Returns:
The portlet description of the portlet with the given handle
Throws:
WSRPException

addPortletDescription

void addPortletDescription(PortletDescription portletDescription)
Add an portlet description to the producer. This portlet description is accessable through the portlet handle in the portlet description. If the producer has already an portlet description with this portlet handle than the old description will be overwritten.

Parameters:
portletDescription - New portlet description

getRegistrationContext

RegistrationContext getRegistrationContext()
Get the current registration context of the consumer registered at this producer or null if no registration is required or happend so far.

Returns:
The current registration context of the consumer at this producer or null.

setRegistrationContext

void setRegistrationContext(RegistrationContext registrationContext)
Set the registration context.

Parameters:
registrationContext - The registration context of a consumer registered at the producer.

register

RegistrationContext register(RegistrationData registrationData)
                             throws WSRPException
Method establishes a relationship between consumer and producer. Note: A additional call of setRegistrationContext() is not neccesary

Parameters:
registrationData - Data which is used to register the consumer
Returns:
The registration context received by the producer
Throws:
WSRPException

modifyRegistration

RegistrationState modifyRegistration(RegistrationData registrationData)
                                     throws WSRPException
Can be used to modify the relationship between consumer and producer. Note: A additional call of setRegistrationContext() is not neccesary

Parameters:
registrationData - The new registration data
Returns:
New registration context
Throws:
WSRPException

deregister

ReturnAny deregister()
                     throws WSRPException
End an existing consumer producer relationship and remove the registration context

Returns:
Can be anything
Throws:
WSRPException

isRegistrationInterfaceSupported

boolean isRegistrationInterfaceSupported()
Check wether the optional registration interface is supported

Returns:
true if a registration interface endpoint URL is set

isPortletManagementInferfaceSupported

boolean isPortletManagementInferfaceSupported()
Check wether the optional portlet management interface is supported

Returns:
true if a portlet management interface endpoint URL is set