org.jboss.security.negotiation
Class MessageFactory

java.lang.Object
  extended by org.jboss.security.negotiation.MessageFactory
Direct Known Subclasses:
NTLMMessageFactory, SPNEGOMessageFactory

public abstract class MessageFactory
extends Object

The base message factory for reading messages from InputStreams and creating the Java representation of the message.

Since:
10th August 2008
Version:
$Revision: 76862 $
Author:
darran.lofthouse@jboss.com

Constructor Summary
MessageFactory()
           
 
Method Summary
abstract  boolean accepts(InputStream in)
          Peek at the data in the InputStream and return true if this MessageFactory can handle the data.
abstract  NegotiationMessage createMessage(InputStream in)
          Read the message from the InputStream and create the Java representation of the message.
static MessageFactory newInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageFactory

public MessageFactory()
Method Detail

newInstance

public static MessageFactory newInstance()
                                  throws NegotiationException
Returns:
a new MessageFactory to process a message available from an InputStream.
Throws:
NegotiationException

accepts

public abstract boolean accepts(InputStream in)
                         throws IOException
Peek at the data in the InputStream and return true if this MessageFactory can handle the data.

Throws:
IOException

createMessage

public abstract NegotiationMessage createMessage(InputStream in)
                                          throws IOException
Read the message from the InputStream and create the Java representation of the message.

Throws:
IOException


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.