es.rediris.aarr.protocol
Interface ProtocolAdaptor

All Known Implementing Classes:
SAMLPostAdaptor

public interface ProtocolAdaptor

This interface defines the methods that any implementing protocol adaptor must contain:

Author:
macias

Method Summary
 void discard()
          Discards the active element and writes a diagnostic
 java.lang.String getNextInput()
          Provides the label of the first available input element, and then removes it; the element becomes the active one and overrides the previous.
 java.lang.String[] getValue(java.lang.String name)
          Gets the values for a given param of the active element
 void init(ProfileManager pm)
          Inits the adaptor with the information provided by the ProfileManager in use
 void sendElement(java.lang.String name, java.lang.String[] components, java.lang.String[] values)
          Sends an element with the corresponding components and values
 void setObserver(java.util.Observer obs)
          Sets an observer (the rule processor) for the protocol adaptor in use
 void setParam(java.lang.String name, java.lang.String[] ids, java.lang.String[] values)
          This method is used to set attributes and their respective values for a given param name
 

Method Detail

init

void init(ProfileManager pm)
Inits the adaptor with the information provided by the ProfileManager in use


setParam

void setParam(java.lang.String name,
              java.lang.String[] ids,
              java.lang.String[] values)
              throws ProtocolAdaptorConfigException
This method is used to set attributes and their respective values for a given param name

Parameters:
name - The name for the param
ids - An array of strings with identificators for the attributes
values - An array of strings with the values for the attributes
Throws:
ProtocolAdaptorConfigException

setObserver

void setObserver(java.util.Observer obs)
                 throws ProtocolAdaptorConfigException
Sets an observer (the rule processor) for the protocol adaptor in use

Parameters:
obs - An java.util.Observer object
Throws:
ProtocolAdaptorConfigException

getNextInput

java.lang.String getNextInput()
                              throws ProtocolAdaptorReadException
Provides the label of the first available input element, and then removes it; the element becomes the active one and overrides the previous.

Returns:
The name of the first available input element
Throws:
ProtocolAdaptorReadException

discard

void discard()
Discards the active element and writes a diagnostic


getValue

java.lang.String[] getValue(java.lang.String name)
Gets the values for a given param of the active element

Parameters:
name - the name of the param
Returns:
An strings array with all the values for the param

sendElement

void sendElement(java.lang.String name,
                 java.lang.String[] components,
                 java.lang.String[] values)
                 throws ProtocolAdaptorSendException
Sends an element with the corresponding components and values

Parameters:
name - tha name of the element to be sent
components - An array of strings containing the components of the element to be sent
values - The values associated to the components
Throws:
ProtocolAdaptorSendException