org.n52.oxf.serviceAdapters
Class OperationResult

java.lang.Object
  extended by org.n52.oxf.serviceAdapters.OperationResult

public class OperationResult
extends Object

Encapsulates the result of an Operation of a ServiceAdapter. It contains the inputStream and the request the adapter had sended.

Author:
Theodor Foerster

Field Summary
protected static int DEFAULT_BUFFER_SIZE
           
protected  byte[] incomingResult
           
protected  String sendedRequest
           
protected  ParameterContainer usedParameters
           
 
Constructor Summary
OperationResult(InputStream incomingStream, ParameterContainer usedParameters, String sendedRequest)
           
 
Method Summary
 byte[] getIncomingResult()
           
 ByteArrayInputStream getIncomingResultAsStream()
           
 String getSendedRequest()
           
 ParameterContainer getUsedParameters()
           
protected  void setIncomingResult(InputStream incomingStream, int bufferSize)
          reads the incomingStream and stores it in the incomingResult byte array.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

protected static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

incomingResult

protected byte[] incomingResult

sendedRequest

protected String sendedRequest

usedParameters

protected ParameterContainer usedParameters
Constructor Detail

OperationResult

public OperationResult(InputStream incomingStream,
                       ParameterContainer usedParameters,
                       String sendedRequest)
                throws IOException
Parameters:
incomingResult - InputStream coming as the result from the service.
usedParameters - ParameterContainer containing the Parameters from which the request has been build.
sendedRequest - the request-string sended to the service.
Throws:
IOException
Method Detail

setIncomingResult

protected void setIncomingResult(InputStream incomingStream,
                                 int bufferSize)
                          throws IOException
reads the incomingStream and stores it in the incomingResult byte array.

Parameters:
incomingStream -
bufferSize -
Throws:
IOException

getIncomingResult

public byte[] getIncomingResult()

getIncomingResultAsStream

public ByteArrayInputStream getIncomingResultAsStream()

getSendedRequest

public String getSendedRequest()

getUsedParameters

public ParameterContainer getUsedParameters()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005 - 2010 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.