public abstract class DataEndpoint extends Endpoint
open(), close(), and getRecordCount() are defined here.| Modifier and Type | Class and Description |
|---|---|
static class |
DataEndpoint.State |
| Modifier and Type | Field and Description |
|---|---|
protected Record |
lastRecord |
static String |
PRODUCT |
static String |
PRODUCT_VERSION |
static String |
VENDOR |
protected static String |
XML_INPUT_FACTORY_KEY |
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
DataEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
protected void |
decrementRecordCount()
Reduces this endpoint's record-count by 1.
|
static void |
enableJmx()
Turns JMX (Java Management Extensions) monitoring & management on and exposes running Jobs and EventBuses as managed beans.
|
Record |
getLastRecord()
Returns the most recent record seen by this endpoint while it is open or
null. |
DataEndpoint |
getNestedEndpoint()
Returns the
Endpoint held inside this one or null if there isn't one. |
long |
getRecordCount()
Returns this endpoint's record-count as a
long. |
BigInteger |
getRecordCountAsBigInteger()
Returns this endpoint's record-count as a
BigInteger. |
String |
getRecordCountAsString()
Returns this endpoint's record-count as a
String. |
DataEndpoint |
getRootEndpoint()
Returns the deepest, nested
Endpoint held inside this one, otherwise this instance is returned if
there aren't any nested Endpoints. |
protected void |
incrementRecordCount()
Increases this endpoint's record-count by 1.
|
boolean |
isRecordCountBigInteger()
Indicates if this endpoint's record-count is too big (over 1000000000000000000L or 1.0e+18) for a
long
and should be retrieved as a BigInteger using getRecordCountAsBigInteger(). |
void |
open()
Makes this endpoint ready for reading or writing.
|
protected void |
resetRecordCount()
Restarts this endpoint's record-count at 0.
|
String |
toString() |
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic static final String VENDOR
public static final String PRODUCT
public static final String PRODUCT_VERSION
protected static final String XML_INPUT_FACTORY_KEY
protected Record lastRecord
public DataEndpoint getNestedEndpoint()
EndpointEndpoint held inside this one or null if there isn't one.getNestedEndpoint in class Endpointpublic DataEndpoint getRootEndpoint()
EndpointEndpoint held inside this one, otherwise this instance is returned if
there aren't any nested Endpoints.getRootEndpoint in class Endpointpublic Record getLastRecord()
null.public void open()
throws DataException
open in class EndpointDataExceptionpublic void close()
throws DataException
close in class EndpointDataExceptionpublic DataException addExceptionProperties(DataException exception)
EndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties in class Endpointprotected void incrementRecordCount()
protected void decrementRecordCount()
protected void resetRecordCount()
public boolean isRecordCountBigInteger()
long
and should be retrieved as a BigInteger using getRecordCountAsBigInteger().getRecordCountAsBigInteger(),
getRecordCount()public long getRecordCount()
long. If the count grows above 1000000000000000000L or 1.0e+18,
it will wrap to 1, but getRecordCountAsBigInteger() will contain the full value.public BigInteger getRecordCountAsBigInteger()
BigInteger.getRecordCount(),
isRecordCountBigInteger()public String getRecordCountAsString()
String.public static void enableJmx()
Copyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.