org.planx.xmlstore.stores
Class NetworkProxy
java.lang.Object
org.planx.xmlstore.stores.AbstractXMLStore
org.planx.xmlstore.stores.NetworkProxy
- All Implemented Interfaces:
- XMLStore
public class NetworkProxy
- extends AbstractXMLStore
- Author:
- Henning Niss, Thomas Ambus
NetworkProxy
public NetworkProxy(String host,
int port)
throws IOException,
UnknownHostException
- Throws:
IOException
UnknownHostException
NetworkProxy
public NetworkProxy(InetSocketAddress sockaddr)
throws IOException
- Throws:
IOException
NetworkProxy
public NetworkProxy(InetAddress addr,
int port)
throws IOException
- Throws:
IOException
resolvedLoad
protected Node resolvedLoad(Reference vref)
throws IOException,
UnknownReferenceException
- Description copied from class:
AbstractXMLStore
- Called by
AbstractXMLStore.load(org.planx.xmlstore.Reference) after resolving RelativeReferences.
- Overrides:
resolvedLoad in class AbstractXMLStore
- Parameters:
vref - the resolved Reference
- Throws:
IOException
UnknownReferenceException
save
public Reference save(Node node)
throws IOException
- The subtree rooted at the specified
Node is sent to the
remote XMLStore and saved there. A Reference
to the root is returned.
- Specified by:
save in interface XMLStore- Overrides:
save in class AbstractXMLStore
- Parameters:
node - representing XML data in the form of semi-structured tree data
- Returns:
- a reference to the saved node/tree
- Throws:
IOException - if an error occurs during disk, network, etc access
close
public void close()
throws IOException
- Description copied from interface:
XMLStore
- The method is used to let the
XMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. Once close has been issued on an XMLStore, the store
is no longer available for handling requests. Any subsequent
request to the store will result in an exception being
thrown. An XMLStore implementation has to ensure that
this happens.
- Specified by:
close in interface XMLStore- Overrides:
close in class AbstractXMLStore
- Throws:
IOException - if it is not possible to properly close the store
toString
public String toString()
- Overrides:
toString in class AbstractXMLStore
checkClosed
protected void checkClosed()
- Overrides:
checkClosed in class AbstractXMLStore
Copyright © 2010. All Rights Reserved.