org.syrup.services
Class BlobClient

java.lang.Object
  extended byorg.syrup.services.BlobClient
All Implemented Interfaces:
javax.naming.Referenceable, java.io.Serializable

public class BlobClient
extends java.lang.Object
implements java.io.Serializable, javax.naming.Referenceable

Provides BLOB storage functionality by sending requests to the BlobServer.

Author:
Robbert van Dalen
See Also:
Serialized Form

Field Summary
 java.lang.String host
           
 int port
           
static long serialVersionUID
           
 
Constructor Summary
BlobClient(java.lang.String location)
           
BlobClient(java.lang.String host_, int port_)
           
 
Method Summary
 void get(java.io.InputStream i, java.io.OutputStream o)
           
 java.lang.String getLocation()
           
 javax.naming.Reference getReference()
           
static void main(java.lang.String[] args)
           
 void post(java.io.InputStream content, java.io.OutputStream id)
           
 void read(java.io.InputStream id, java.io.OutputStream result)
           
 void write(java.io.InputStream content, java.io.OutputStream id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

public final java.lang.String host

port

public final int port

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

BlobClient

public BlobClient(java.lang.String host_,
                  int port_)

BlobClient

public BlobClient(java.lang.String location)
           throws java.lang.Exception
Method Detail

getLocation

public java.lang.String getLocation()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

read

public void read(java.io.InputStream id,
                 java.io.OutputStream result)
          throws java.lang.Exception
Throws:
java.lang.Exception

write

public void write(java.io.InputStream content,
                  java.io.OutputStream id)
           throws java.lang.Exception
Throws:
java.lang.Exception

post

public void post(java.io.InputStream content,
                 java.io.OutputStream id)
          throws java.lang.Exception
Throws:
java.lang.Exception

get

public void get(java.io.InputStream i,
                java.io.OutputStream o)
         throws java.lang.Exception
Throws:
java.lang.Exception

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException