0fa0f1617c2994c390f2a75ce8b2d2276aece0a7
[public/netxms.git] / src / java / netxms-client / src / main / java / org / netxms / client / objects / Zone.java
1 /**
2 * NetXMS - open source network management system
3 * Copyright (C) 2003-2011 Victor Kirhenshtein
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 package org.netxms.client.objects;
20
21 import org.netxms.base.NXCPCodes;
22 import org.netxms.base.NXCPMessage;
23 import org.netxms.client.NXCSession;
24
25 /**
26 * Zone object
27 */
28 public class Zone extends GenericObject
29 {
30 private long zoneId;
31 private long agentProxy;
32 private long snmpProxy;
33 private long icmpProxy;
34
35 /**
36 * Create zone object from NXCP message
37 *
38 * @param msg NXCP message
39 * @param session owning session
40 */
41 public Zone(NXCPMessage msg, NXCSession session)
42 {
43 super(msg, session);
44 zoneId = msg.getVariableAsInt64(NXCPCodes.VID_ZONE_ID);
45 agentProxy = msg.getVariableAsInt64(NXCPCodes.VID_AGENT_PROXY);
46 snmpProxy = msg.getVariableAsInt64(NXCPCodes.VID_SNMP_PROXY);
47 icmpProxy = msg.getVariableAsInt64(NXCPCodes.VID_ICMP_PROXY);
48 }
49
50 /**
51 * @return the zoneId
52 */
53 public long getZoneId()
54 {
55 return zoneId;
56 }
57
58 /**
59 * @return the agentProxy
60 */
61 public long getAgentProxy()
62 {
63 return agentProxy;
64 }
65
66 /**
67 * @return the snmpProxy
68 */
69 public long getSnmpProxy()
70 {
71 return snmpProxy;
72 }
73
74 /**
75 * @return the icmpProxy
76 */
77 public long getIcmpProxy()
78 {
79 return icmpProxy;
80 }
81
82 /* (non-Javadoc)
83 * @see org.netxms.client.objects.GenericObject#getObjectClassName()
84 */
85 @Override
86 public String getObjectClassName()
87 {
88 return "Zone";
89 }
90 }