com.scalagent.joram.mom.dest.collector
Class URLAcquisition
java.lang.Object
com.scalagent.joram.mom.dest.collector.URLAcquisition
- All Implemented Interfaces:
- AcquisitionHandler
public class URLAcquisition
- extends java.lang.Object
- implements AcquisitionHandler
Field Summary |
static java.lang.String |
FILE
|
static java.lang.String |
HOST
|
static java.lang.String |
PATH
|
private int |
type
|
static java.lang.String |
TYPE
|
static java.lang.String |
URL
|
private java.lang.String |
urlStr
|
Method Summary |
void |
close()
Closes this handler and releases any system resources associated to it. |
private static byte[] |
getResource(java.lang.String spec,
Properties prop)
get the file. |
void |
retrieve(ReliableTransmitter transmitter)
Check the URL resource. |
void |
setProperties(java.util.Properties properties)
Configures the handler with the given properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE
public static final java.lang.String FILE
- See Also:
- Constant Field Values
PATH
public static final java.lang.String PATH
- See Also:
- Constant Field Values
HOST
public static final java.lang.String HOST
- See Also:
- Constant Field Values
URL
public static final java.lang.String URL
- See Also:
- Constant Field Values
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
urlStr
private java.lang.String urlStr
type
private int type
URLAcquisition
public URLAcquisition()
getResource
private static byte[] getResource(java.lang.String spec,
Properties prop)
throws java.io.IOException
- get the file.
- Parameters:
spec
- the String to parse as a URL.
- Returns:
- the file in byte format.
- Throws:
java.io.IOException
retrieve
public void retrieve(ReliableTransmitter transmitter)
throws java.lang.Exception
- Check the URL resource.
Store file in Queue or send to topic (collector destination.
- Specified by:
retrieve
in interface AcquisitionHandler
- Parameters:
transmitter
- a transmitter used to transmit retrieved messages to the MOM
reliably.
- Throws:
java.lang.Exception
- See Also:
com.scalagent.joram.mom.dest.collector.Collector#check()
setProperties
public void setProperties(java.util.Properties properties)
- Description copied from interface:
AcquisitionHandler
- Configures the handler with the given properties. This method is called one
time before the first call to retrieve and then when the acquisition
destination receives a configuration message.
- Specified by:
setProperties
in interface AcquisitionHandler
- Parameters:
properties
- The new set of properties.
close
public void close()
- Description copied from interface:
AcquisitionHandler
- Closes this handler and releases any system resources associated to it.
There will be no subsequent call to this handler after it has been closed.
- Specified by:
close
in interface AcquisitionHandler
Copyright © 2010 ScalAgent D.T.. All Rights Reserved.