|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.graphicLoader.netmap.NetMapConnector
public class NetMapConnector
The NetMapConnector is the bridge between the parser from the output of the NetMap server (NetMapReader), and whoever wants the OMGraphicList that is being managed. It forwards the list on to the NetMapListReceiver that wants the list. The NetMapConnector will create it's NetMapReader to control and use. If you have a component that wants to receive updates from the reader, then you can register as an NetMapListener with the NetMapConnector. The NetMapConnector can be used in conjunction with the NetMapConnectionHandler. The NetMapConnectionHandler will look for NetMapConnectors in the BeanContext (MapHandler), and create a NetMapGraphicLoader for it. That will set off the GraphicLoader -> GraphicLoaderConnector -> GraphicLoaderPlugIn -> PlugInLayer creation chain, if the GraphicLoaderConnector is also in the MapHandler. The following properties can be set:
server=hostname of the NetMap server port=port of NetMap server defaultView=default view for NetMap server stream
Field Summary | |
---|---|
protected java.lang.String |
defaultView
The NetMap server has a notion of views that represent nodes and links, and these are names. |
static java.lang.String |
DefaultViewProperty
|
static java.lang.String |
GetViewsCmd
|
static java.lang.String |
LoadViewCmd
|
protected java.lang.String |
port
|
static java.lang.String |
PortProperty
|
protected java.lang.String |
propertyPrefix
|
protected java.lang.String |
server
|
static java.lang.String |
ServerConnectCmd
|
static java.lang.String |
ServerDisconnectCmd
|
static java.lang.String |
ServerProperty
|
static java.lang.String |
STATUS_CONNECTED
|
static java.lang.String |
STATUS_CONNECTING
|
static java.lang.String |
STATUS_IDLE
|
Fields inherited from interface com.bbn.openmap.graphicLoader.netmap.NetMapConstants |
---|
CLEAR, COMMAND_FIELD, DATABASE_TAG_FIELD, DEFAULT_PORT, DEFAULT_SERVER, ELEVATION_FIELD, ERROR_VALUE_DOUBLE, ERROR_VALUE_FLOAT, ERROR_VALUE_INT, HEIGHT_FIELD, ICON_FIELD, INDEX_FIELD, IP_FIELD, JMAP_VIEW_CMD, JOFFSET_FIELD, LABEL_FIELD, LAT_FIELD, LINE_DELETE, LINE_DELETE_STRING, LINK_NODE1_FIELD, LINK_NODE2_FIELD, LINK_OBJECT, LINK_OBJECT_STATUS, LON_FIELD, MENU_FIELD, NAME_FIELD, NODE_DELETE, NODE_DELETE_STRING, NODE_MOVE, NODE_MOVE_STRING, NODE_OBJECT, NODE_OBJECT_STATUS, POSX_FIELD, POSY_FIELD, REFRESH, SHAPE_FIELD, STATUS_FIELD, TIME_FIELD, UPDATE, WIDTH_FIELD |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
NetMapConnector()
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Act on GUI commands controlling the NetMapReader. |
void |
addNetMapListener(NetMapListener nml)
Add a NetMapListener to receive NetMapEvents. |
void |
clearNetMapListeners()
Clear all NetMapListeners from receiving NetMapEvents. |
void |
connect(java.lang.String view)
Connects to the NetMap server to get messages about the given view. |
protected void |
connectionDown()
Callback for the NetMapReader to let it provide the connector with connection status. |
protected void |
connectionUp()
Callback for the NetMapReader to let it provide the connector with connection status. |
void |
disconnect()
Resets the controls to the disconnected mode. |
protected void |
distributeEvent(java.util.Properties netmapProps)
Called by the NetMapReader so a parsed line, representing an event, can be dispersed to the listeners. |
java.lang.String |
getDefaultView()
Get the defaultView to use for NetMap server queries. |
java.awt.Component |
getGUI()
Gets the GUI control for the NetMapReader, creates it if it doesn't exist. |
java.lang.String |
getPort()
Get the port that the NetMap server is running on. |
java.util.Properties |
getProperties(java.util.Properties list)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
java.util.Properties |
getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups. |
java.lang.String |
getServer()
Get the hostname or IP address of the NetMap server. |
ChoiceList |
getViews()
Gets a list of possible views. |
void |
removeNetMapListener(NetMapListener nml)
Remove a NetMapListener from the list to receive NetMapEvents. |
void |
reset()
Complete disconnect, sends clear command to NetMapListeners, resets GUI if it's being used. |
void |
setDefaultView(java.lang.String view)
Set the defaultView to use for NetMap server queries. |
void |
setPort(java.lang.String port)
Set the port that the NetMap server is running on. |
void |
setProperties(java.util.Properties setList)
Method to set the properties in the PropertyConsumer. |
void |
setProperties(java.lang.String prefix,
java.util.Properties setList)
Method to set the properties in the PropertyConsumer. |
void |
setPropertyPrefix(java.lang.String prefix)
Set the property key prefix that should be used by the PropertyConsumer. |
void |
setServer(java.lang.String sName)
Set the hostname or IP address to use to contact the NetMap server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ServerConnectCmd
public static final java.lang.String ServerDisconnectCmd
public static final java.lang.String LoadViewCmd
public static final java.lang.String GetViewsCmd
public static final java.lang.String ServerProperty
public static final java.lang.String PortProperty
public static final java.lang.String DefaultViewProperty
public static final java.lang.String STATUS_CONNECTING
public static final java.lang.String STATUS_CONNECTED
public static final java.lang.String STATUS_IDLE
protected java.lang.String server
protected java.lang.String port
protected java.lang.String defaultView
protected java.lang.String propertyPrefix
Constructor Detail |
---|
public NetMapConnector()
Method Detail |
---|
public void setServer(java.lang.String sName)
public java.lang.String getServer()
public void setPort(java.lang.String port)
public java.lang.String getPort()
public void setDefaultView(java.lang.String view)
public java.lang.String getDefaultView()
public void addNetMapListener(NetMapListener nml)
public void removeNetMapListener(NetMapListener nml)
public void clearNetMapListeners()
protected void distributeEvent(java.util.Properties netmapProps)
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
protected void connectionUp()
protected void connectionDown()
public void disconnect()
public ChoiceList getViews()
public void connect(java.lang.String view)
public void reset()
public java.awt.Component getGUI()
public void setProperties(java.util.Properties setList)
setProperties
in interface PropertyConsumer
setList
- a properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public void setProperties(java.lang.String prefix, java.util.Properties setList)
setProperties
in interface PropertyConsumer
prefix
- a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.setList
- a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public java.util.Properties getProperties(java.util.Properties list)
getProperties
in interface PropertyConsumer
list
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties list)
getPropertyInfo
in interface PropertyConsumer
list
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public void setPropertyPrefix(java.lang.String prefix)
setPropertyPrefix
in interface PropertyConsumer
prefix
- the prefix String.public java.lang.String getPropertyPrefix()
getPropertyPrefix
in interface PropertyConsumer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |