|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INAAgent
Provides access to properties/methods common to all network analysis agents.
INAAgent is the interface implemented by objects that wish to be attached to the NAContext and to be notified when various events occur like when the context or the context's results are updated.
The NAStreetDirectionsAgent is an extension to the NAContext that implements INAAgent to generate street directions.
Method Summary | |
---|---|
boolean |
applies(IDENetworkDataset network,
INAContextHelper contextHelper)
Indicates if the agent is appropriate to use with the given network dataset. |
String |
getName()
The name of the agent. |
void |
initialize(IDENetworkDataset network,
INAContextHelper contextHelper)
Get the agent ready for action. |
void |
onContextUpdated()
Called when the context is updated. |
void |
onResultUpdated()
Called when a result is updated. |
Method Detail |
---|
String getName() throws IOException, AutomationException
Returns the name of the agent. This property is implemented within the agent; there is no need to set this property.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean applies(IDENetworkDataset network, INAContextHelper contextHelper) throws IOException, AutomationException
The method Applies indicates if the NAAgent should be attached to the NAContext referenced by the input INAContextHelper.
Applies returns true if the agent is applicable and has not already been attached to the NAContext. For example, a NAStreetDirectionsAgent will only apply to solvers that support driving directions.
network
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)contextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void initialize(IDENetworkDataset network, INAContextHelper contextHelper) throws IOException, AutomationException
Initialize is called when the NAContext::Bind is called and the NAContext is getting into a consistent state.
network
- A reference to a com.esri.arcgis.geodatabase.IDENetworkDataset (in)contextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void onResultUpdated() throws IOException, AutomationException
OnResultUpdated is called when the NAContext::Result object has been updated. For example, this would be called after INASolver::Solve.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void onContextUpdated() throws IOException, AutomationException
OnContextUpdated is called when the NAContext object has been updated. For example, this would be called after a network location has been added or removed.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |