use of org.netxms.client.objects.AgentPolicyLogParser in project netxms by netxms.
the class NXCSession method createObjectFromMessage.
/**
* Create object from message
*
* @param msg Source NXCP message
* @return NetXMS object
*/
private AbstractObject createObjectFromMessage(NXCPMessage msg) {
final int objectClass = msg.getFieldAsInt32(NXCPCodes.VID_OBJECT_CLASS);
AbstractObject object = createCustomObjectFromMessage(objectClass, msg);
if (object != null)
return object;
switch(objectClass) {
case AbstractObject.OBJECT_ACCESSPOINT:
object = new AccessPoint(msg, this);
break;
case AbstractObject.OBJECT_AGENTPOLICY:
object = new AgentPolicy(msg, this);
break;
case AbstractObject.OBJECT_AGENTPOLICY_CONFIG:
object = new AgentPolicyConfig(msg, this);
break;
case AbstractObject.OBJECT_AGENTPOLICY_LOGPARSER:
object = new AgentPolicyLogParser(msg, this);
break;
case AbstractObject.OBJECT_BUSINESSSERVICE:
object = new BusinessService(msg, this);
break;
case AbstractObject.OBJECT_BUSINESSSERVICEROOT:
object = new BusinessServiceRoot(msg, this);
break;
case AbstractObject.OBJECT_CHASSIS:
object = new Chassis(msg, this);
break;
case AbstractObject.OBJECT_CLUSTER:
object = new Cluster(msg, this);
break;
case AbstractObject.OBJECT_CONDITION:
object = new Condition(msg, this);
break;
case AbstractObject.OBJECT_CONTAINER:
object = new Container(msg, this);
break;
case AbstractObject.OBJECT_DASHBOARDGROUP:
object = new DashboardGroup(msg, this);
break;
case AbstractObject.OBJECT_DASHBOARD:
object = new Dashboard(msg, this);
break;
case AbstractObject.OBJECT_DASHBOARDROOT:
object = new DashboardRoot(msg, this);
break;
case AbstractObject.OBJECT_INTERFACE:
object = new Interface(msg, this);
break;
case AbstractObject.OBJECT_MOBILEDEVICE:
object = new MobileDevice(msg, this);
break;
case AbstractObject.OBJECT_NETWORK:
object = new EntireNetwork(msg, this);
break;
case AbstractObject.OBJECT_NETWORKMAP:
object = new NetworkMap(msg, this);
break;
case AbstractObject.OBJECT_NETWORKMAPGROUP:
object = new NetworkMapGroup(msg, this);
break;
case AbstractObject.OBJECT_NETWORKMAPROOT:
object = new NetworkMapRoot(msg, this);
break;
case AbstractObject.OBJECT_NETWORKSERVICE:
object = new NetworkService(msg, this);
break;
case AbstractObject.OBJECT_NODE:
object = new Node(msg, this);
break;
case AbstractObject.OBJECT_NODELINK:
object = new NodeLink(msg, this);
break;
case AbstractObject.OBJECT_POLICYGROUP:
object = new PolicyGroup(msg, this);
break;
case AbstractObject.OBJECT_POLICYROOT:
object = new PolicyRoot(msg, this);
break;
case AbstractObject.OBJECT_RACK:
object = new Rack(msg, this);
break;
case AbstractObject.OBJECT_SENSOR:
object = new Sensor(msg, this);
break;
case AbstractObject.OBJECT_SERVICEROOT:
object = new ServiceRoot(msg, this);
break;
case AbstractObject.OBJECT_SLMCHECK:
object = new ServiceCheck(msg, this);
break;
case AbstractObject.OBJECT_SUBNET:
object = new Subnet(msg, this);
break;
case AbstractObject.OBJECT_TEMPLATE:
object = new Template(msg, this);
break;
case AbstractObject.OBJECT_TEMPLATEGROUP:
object = new TemplateGroup(msg, this);
break;
case AbstractObject.OBJECT_TEMPLATEROOT:
object = new TemplateRoot(msg, this);
break;
case AbstractObject.OBJECT_VPNCONNECTOR:
object = new VPNConnector(msg, this);
break;
case AbstractObject.OBJECT_ZONE:
object = new Zone(msg, this);
break;
default:
object = new GenericObject(msg, this);
break;
}
return object;
}
Aggregations