gr.uoa.di.madgik.grs.proxy.http
Class HTTPStoreWriterProxy
java.lang.Object
gr.uoa.di.madgik.grs.proxy.http.HTTPStoreWriterProxy
- All Implemented Interfaces:
- IProxy
public class HTTPStoreWriterProxy
- extends java.lang.Object
- implements IProxy
This proxy class although it implements the tagging IProxy
interface, it does not
implement, as the name suggests, the IWriterProxy
interface. The reason for this is that
it is meant to be used for a special case of IBuffer
publishing which is through the
buffer store utility provided. This proxy class can be used to create a locator URI pointing to
a stored IBuffer
that contains all the Record
s available through the provided
URI locators.
- Author:
- Alex Antoniadis
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPStoreWriterProxy
public HTTPStoreWriterProxy()
store
public static java.net.URI store(java.net.URI[] locators,
IBufferStore.MultiplexType multiplex,
long timeout,
java.util.concurrent.TimeUnit unit)
throws GRS2BufferStoreException,
GRS2ProxyInvalidArgumentException
- This method instantiates an
IBufferStore
through the BufferStoreFactory
, sets the
respective information provided, initializes the IBufferStore
, registers the new store
and creates a locator URI that can be used to access the IBufferStore
. The created locator
is of the following type http://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTPStore
and uses the scheme defined in IProxy.ProxyStoreScheme
. The hostname and port used are the ones
available through HTTPConnectionManager.GetConnectionManagerHostName()
and
HTTPConnectionManager.GetConnectionManagerPort()
- Parameters:
locators
- The locators forwarded to the IBufferStore.setLocators(URI[])
multiplex
- The multiplex type forwarded to IBufferStore.setMultiplexType(gr.uoa.di.madgik.grs.store.buffer.IBufferStore.MultiplexType)
timeout
- The timeout forwarded to IBufferStore.setReaderTimeout(long)
unit
- The timeout time unit forwarded to IBufferStore.setReaderTimeoutTimeUnit(TimeUnit)
- Returns:
- the locator URI to the
IBufferStore
serving the new IBuffer
- Throws:
GRS2BufferStoreException
- the IBufferStore
could not be initialized
GRS2ProxyInvalidArgumentException
- the locator URI could not be created