org.opensaml.ws
Interface MessageSource

All Known Subinterfaces:
HTTPMessageSource

public interface MessageSource

Represents the source of an incoming message. If the message is being delivered in an asychronous method invoking getMessageAsStream(), getMessageAsString(), or getMessageAsString(String) may return null if the message has not yet arrived.


Method Summary
 java.lang.String getContentCharacterEncoding()
          Gets the character encoding of the message, if known.
 long getContentLength()
          Gets the length, in bytes, of the message.
 java.lang.String getContentType()
          Gets the MIME type of the message, if known.
 java.io.InputStream getMessageAsStream()
          Gets the message, if available, as a stream.
 java.lang.String getMessageAsString()
          Gets the message, if available, as a string encoded using the encoding type provided by getContentCharacterEncoding() or UTF-8 if the encoding type is not known.
 java.lang.String getMessageAsString(java.lang.String encoding)
          Gets the message, if available as an encoded string.
 boolean isPeerAuthenticated()
          Gets whether the communication peer was authenticated.
 

Method Detail

isPeerAuthenticated

boolean isPeerAuthenticated()
Gets whether the communication peer was authenticated.

Returns:
whether the communication peer was authenticated

getContentCharacterEncoding

java.lang.String getContentCharacterEncoding()
Gets the character encoding of the message, if known.

Returns:
character encoding of the message

getContentLength

long getContentLength()
Gets the length, in bytes, of the message.

Returns:
length, in bytes, of the message

getContentType

java.lang.String getContentType()
Gets the MIME type of the message, if known.

Returns:
MIME type of the message

getMessageAsStream

java.io.InputStream getMessageAsStream()
Gets the message, if available, as a stream.

Returns:
message as a stream

getMessageAsString

java.lang.String getMessageAsString()
Gets the message, if available, as a string encoded using the encoding type provided by getContentCharacterEncoding() or UTF-8 if the encoding type is not known.

Returns:
message as a string

getMessageAsString

java.lang.String getMessageAsString(java.lang.String encoding)
Gets the message, if available as an encoded string.

Parameters:
encoding - character encoding to use when creating the string
Returns:
message as a string