站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

WSRPProducer - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.wsrp
Interface WSRPProducer

All Known Subinterfaces:
TestWSRPProducer
All Known Implementing Classes:
TestWSRPProducerImpl, WSRPProducerImpl

public interface WSRPProducer

Since:
2.4

Field Summary
static int DEFAULT_SESSION_EXPIRATION_TIME
          The default session expiration time in mili seconds.
static int INFINITE_SESSION_EXPIRATION_TIME
          The value used to specify that a session will never expire.
static java.lang.String SESSION_ATTRIBUTE
          Key under which the session is stored in the invocation attributes.
static java.lang.String SESSION_ID_ATTRIBUTE
          Key under which the session id is stored in the invocation attributes.
 
Method Summary
 void addRegistrationProperty(PropertyDescription propertyDescription)
          Adds a registration property to the set of required information for Consumers to provide when registering with this Producer
 void clearRegistrationProperties()
          Remove all existing registration properties.
 CookieProtocol getRequiresInitCookie()
          Indicates whether or not the Producer requires the Consumer to assist with cookie support of the HTTP protocol.
 int getSessionExpirationTime()
          Maximum number of seconds between invocations referencing a session ID before this Producer will schedule releasing the related resources.
 boolean isRequiresRegistration()
          Determines whether registration is required to access this Producer's information and services.
 boolean isSessionValid(java.lang.String sessionId)
          Checks that the session identified with the specified id is valid.
 void setRequiresInitCookie(CookieProtocol requiresInitCookie)
          Sets the level of cookie support required by the Consumer.
 void setRequiresRegistration(boolean requiresRegistration)
          Specifies whether this Producer requires clients to be registered or not.
 void setSessionExpirationTime(int sessionExpirationTime)
          Sets the expiration time (in seconds) of session associated resources.
 

Field Detail

DEFAULT_SESSION_EXPIRATION_TIME

public static final int DEFAULT_SESSION_EXPIRATION_TIME
The default session expiration time in mili seconds.

See Also:
Constant Field Values

INFINITE_SESSION_EXPIRATION_TIME

public static final int INFINITE_SESSION_EXPIRATION_TIME
The value used to specify that a session will never expire.

See Also:
Constant Field Values

SESSION_ATTRIBUTE

public static final java.lang.String SESSION_ATTRIBUTE
Key under which the session is stored in the invocation attributes.

See Also:
Constant Field Values

SESSION_ID_ATTRIBUTE

public static final java.lang.String SESSION_ID_ATTRIBUTE
Key under which the session id is stored in the invocation attributes.

See Also:
Constant Field Values
Method Detail

setRequiresRegistration

public void setRequiresRegistration(boolean requiresRegistration)
Specifies whether this Producer requires clients to be registered or not.

Parameters:
requiresRegistration - true if registration is required, false otherwise.

isRequiresRegistration

public boolean isRequiresRegistration()
Determines whether registration is required to access this Producer's information and services.

Returns:
true if registration is required, false otherwise.

getRequiresInitCookie

public CookieProtocol getRequiresInitCookie()
Indicates whether or not the Producer requires the Consumer to assist with cookie support of the HTTP protocol. Supported values and semantics:
  • org.jboss.portal.wsrp.core.CookieProtocol#none: The Producer does not need the Consumer to ever invoke org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie).
  • org.jboss.portal.wsrp.core.CookieProtocol#perUser: The Consumer MUST invoke org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie) once per user of the Consumer, and associate any returned cookies with subsequent invocations on behalf of that user.
  • org.jboss.portal.wsrp.core.CookieProtocol#perGroup: The Consumer MUST invoke org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie) once per unique groupID from the PortletDescriptions for the Portlets it is aggregating on a page for each user of the Consumer, and associate any returned cookies with subsequent invocations on behalf of that user targeting Portlets with identical groupIDs.

Returns:
the level of cookie support required from the Consumer

setRequiresInitCookie

public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
Sets the level of cookie support required by the Consumer.

Parameters:
requiresInitCookie - either org.jboss.portal.wsrp.core.CookieProtocol#none, org.jboss.portal.wsrp.core.CookieProtocol#perUser or org.jboss.portal.wsrp.core.CookieProtocol#perGroup

getSessionExpirationTime

public int getSessionExpirationTime()
Maximum number of seconds between invocations referencing a session ID before this Producer will schedule releasing the related resources. INFINITE_SESSION_EXPIRATION_TIME indicates that the sessionID will never expire.

Returns:
the expiration time (in seconds) of session associated resources

setSessionExpirationTime

public void setSessionExpirationTime(int sessionExpirationTime)
Sets the expiration time (in seconds) of session associated resources.

Parameters:
sessionExpirationTime - the maximum number of seconds between invocations referencing a session ID before this Producer will schedule releasing the related resources. If INFINITE_SESSION_EXPIRATION_TIME is passed, then the session will never expire.

isSessionValid

public boolean isSessionValid(java.lang.String sessionId)
Checks that the session identified with the specified id is valid.

Parameters:
sessionId -
Returns:
true if the session associated with the given id is valid, false otherwise.

addRegistrationProperty

public void addRegistrationProperty(PropertyDescription propertyDescription)
Adds a registration property to the set of required information for Consumers to provide when registering with this Producer

Parameters:
propertyDescription -

clearRegistrationProperties

public void clearRegistrationProperties()
Remove all existing registration properties.