Core API 7.15

net.juniper.smgt.sae.scriptservice
Class ScriptServiceTrackingPluginEvent

java.lang.Object
  extended by net.juniper.smgt.sae.plugin.AbstractPluginEvent
      extended by net.juniper.smgt.sae.scriptservice.ScriptServiceTrackingPluginEvent
All Implemented Interfaces:
net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent, net.juniper.smgt.sae.plugin.InterimTrackingPluginEvent, net.juniper.smgt.sae.plugin.PluginEvent, net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent, net.juniper.smgt.sae.plugin.StartTrackingPluginEvent, net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent, net.juniper.smgt.sae.plugin.StopTrackingPluginEvent, net.juniper.smgt.sae.plugin.TrackingPluginEvent

public class ScriptServiceTrackingPluginEvent
extends net.juniper.smgt.sae.plugin.AbstractPluginEvent
implements net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent, net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent, net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent

This class is used by the scripting service to create service tracking event. The set methods can be used by the scripting service to populate data, if not populated then the values from the serviceSessioninfo will be populated for certain attributes. This class was introduced in SRC 4.4 Created: Wed Nov 05 16:00:53 2012


Constructor Summary
ScriptServiceTrackingPluginEvent(ServiceSessionInfo serviceSessionInfo)
          create a service plug-in event instance
 
Method Summary
 AccountingData getAccountingData()
          Get the Accounting Data
 java.lang.String getAccountingId()
          Get the user accounting ID.
 java.lang.String getAggrAccountingId()
          This method is only for Aggregate services only
 java.lang.String getAggrAuthUserId()
          This method is only for Aggregate services only
 java.lang.String getAggrLoginName()
          This method is only for Aggregate services only
 java.lang.String getAggrSessionId()
          This method is only for Aggregate services only
 java.lang.String getAggrUserDn()
          This method is only for Aggregate services only
 java.net.InetAddress getAggrUserInetAddress()
          This method is only for Aggregate services only
 java.lang.String getAuthUserId()
          This method is used only for auth event only.
 java.lang.String getCallingStationId()
          Get Calling-Station-Id associated with the primary interface
 java.util.Collection getDelegatedIpv6Prefix()
          Returns delegated IPv6 prefix
 byte[] getDhcpPacket()
          Get DHCP options returned for DHCP users.
 java.lang.String getDomain()
          Get the Domain
 int getDownstreamBandwidth()
          Get the Service Downstream Bandwidth
 int getEventTime()
          The event time is calculated from evenTimemilliSeconds
 long getEventTimeMillisecond()
          Get the event time in milli seconds
 byte[] getFramedIpv6Prefix()
          Get the framed IPv6 prefix
 java.lang.String getHostName()
          Get the Host name
 java.lang.String[] getIfRadiusClass()
          Get all values of interface-radius class.
 java.lang.String getIfSessionId()
          Get the Interface Session Id
 long getInOctets()
          Get number of octets received from user (64bit)
 long getInPackets()
          Get the number of packets transfered from this service
 java.lang.String getInterfaceAlias()
          Get the interface alias, i.e. alternative description of managed interface.
 java.lang.String getInterfaceDescr()
          Get Interface Description
 java.lang.String getInterfaceName()
          Get the name of the interface through which subscriber comes in
 long getInterfaceSpeed()
          Get the interface speed
 int getInterimTime()
          Get the Interim Time in seconds
 java.lang.String[] getLocalQosProfile()
          Get the local qos profiles as String[]
 net.juniper.smgt.sae.session.SessionProperties getLocalQosProfiles()
          Get the local qos profiles as Session properties
 java.net.InetAddress getLocalTunnelInetAddress()
          InetAddress of the local end of an L2TP tunnel.
 java.lang.String getLoginName()
          Get the subscriber login name
 java.lang.String getManagerId()
          Get the Manager ID
 java.net.InetAddress getNasInetAddress()
          Get the IP address the virtual router uses for accounting purposes.
 int getNasIp()
          Get the ERX IP Address
 int getNasPort()
          Get NAS-Port, i.e. a numerical index that identifies the layer 2 interface.
 int getOperational()
          This method is not for Start service tracking.
 long getOutOctets()
          Get number of octets sent to user (64bit)
 long getOutPackets()
          Get the number of packets transfered from this service
 java.lang.String getPortId()
          Get NAS-Port-ID, i.e. a name of the interface including layer 2 access information.
 java.lang.String getPrimaryUserName()
          Get the primary user name.
 java.lang.String[] getProperty()
          Get the Property used to get arbitrary attributes from SessionProperties
 java.lang.String[] getRadiusClass()
          Get the Radius Class
 long getRatingGroup()
           
 java.net.InetAddress getRemoteTunnelInetAddress()
          InetAddress of the far end of an L2TP tunnel.
 java.lang.String getRouterName()
          get the router name
 java.lang.String getRouterType()
          Get the router type
 java.lang.String getServiceBundle()
          Get the service bundle, which is only available for PPP and authenticated DHCP addresses.
 long getServiceIdentifier()
          Get the 3gpp Service Identifier attribute
 java.lang.String getServiceName()
          Get the Service Name
 java.lang.String getServiceScope()
          Get the Service Scope To get service scope, needs the Service object
 java.lang.String getServiceSessionName()
          Get the Service Session Name
 java.lang.String getServiceSessionTag()
          Get the Service Session Tag
 java.lang.String getSessionId()
          Get the SessionId
 net.juniper.smgt.sae.session.SessionProperties getSessionProperties()
          Return the SessionPoperties
 int getSessionTime()
          Get the Session time
 int getSessionTimeout()
          Get the Session Timeout in seconds
 java.lang.String getSubscriptionName()
          Get the Subscription Name
 java.lang.String[] getSubstitution()
          Get the Substitution See the SSC Administration and Operations Guide for details about how substitutions affect service policies via paramater value aquisitions, and for detailed information about the format of the Strings that contain the substitutions.
 int getTerminateCause()
          Get the Terminate Error Code
 long getTotalOctets()
          Get number of total octets (sent/received) to the user (64bit)
 int getUpstreamBandwidth()
          Get the Service up stream bandwidth
 java.lang.String getUserDn()
          Get the LDAP distinguished name of the loaded user profile assigned to the user.
 java.net.InetAddress getUserInetAddress()
          Get the InetAddress associated with PPP or DHCP user.
 int getUserIpAddress()
          Get the User IPv4 address
 int getUserIpMask()
          Get the Subscriber IP mask
 java.lang.String getUserMacAddress()
          Get MAC address of DHCP user.
 java.lang.String[] getUserProperty()
          Get the property from user plug-in event.
 java.lang.String[] getUserRadiusClass()
          Get the User Radius Class
 java.lang.String getUserSessionHandle()
          Get the user session handle
 java.lang.String getUserSessionId()
          Get the User SessionId
 net.juniper.smgt.sae.session.SessionProperties getUserSessionProperties()
          Get the session properties from user plug-in event.
 java.lang.String getUserType()
          Get the user type.
 java.lang.String getVpnId()
          Get the vpn Id
 boolean isSyncStopEvent()
           
 void setAccountingId(java.lang.String acctId)
          Set the user accounting ID.
 void setCallingStationId(java.lang.String stationId)
          Set Calling-Station-Id associated with the primary interface
 void setDhcpPacket(byte[] dhcpPacket)
          Set DHCP options returned for DHCP users.
 void setDomain(java.lang.String theLoginName)
          Set the Domain
 void setDownstreamBandwidth(int bandwidth)
          set the Service Downstream Bandwidth
 void setFramedIpv6Prefix(byte[] framedIpv6Prefix)
          Set the framed IPv6 prefix
 void setHostName(java.lang.String hostName)
          Set the Host name
 void setIfSessionId(java.lang.String theIntfSessionId)
          Set the Interface Session Id
 void setInOctets(long inOctets)
          Set number of octets received from user (64bit)
 void setInPackets(long packets_in)
          Set the number of packets transfered from this service
 void setInterfaceAlias(java.lang.String interfaceAlias)
          Set the interface alias, i.e. alternative description of managed interface.
 void setInterfaceDescr(java.lang.String interfaceDesc)
          Set Interface Description
 void setInterfaceName(java.lang.String interfaceName)
          Set the interface name through which subscriber comes in
 void setInterfaceSpeed(long speed)
          Set the Interface speed
 void setInterimTime(int interval)
          Set the Interim Time in seconds
 void setLocalQosProfile(java.lang.String[] localQosProfile)
          Set the local qos profiles as String[]
 void setLocalQosProfiles(java.util.TreeSet localQosProfile)
          Set the local qos profiles as Session properties
 void setLocalTunnelInetAddress(java.net.InetAddress localTunnelInetAddr)
          InetAddress of the local end of an L2TP tunnel.
 void setLoginName(java.lang.String loginName)
          Set the subscriber Login Name
 void setNasInetAddress(java.net.InetAddress nasInetAddr)
          Set the IP address the virtual router uses for accounting purposes.
 void setNasIp(byte[] nasIp)
          Set the ERX IP Address in byte array
 void setNasPort(int nasPort)
          Set NAS-Port, i.e. a numerical index that identifies the layer 2 interface.
 void setOperational(int operational)
          Set operational
 void setOutOctets(long outOctets)
          Set number of octets sent to user (64bit)
 void setOutPackets(long packets_out)
          Set the number of packets transfered from this service
 void setPortId(java.lang.String portId)
          Set the NAS-Port-ID
 void setPrimaryUserName(java.lang.String primaryUsername)
          The primary user name is the name that was used to authenticate the transport interface of the user.
 void setProperty(java.lang.String key, java.lang.String value)
          The method setProperty can be used to set arbitrary attributes required by the event.
 void setRadiusClass(java.lang.String[] radiusClass)
          Set the Radius Class
 void setRatingGroup(long ratingGroup)
           
 void setRemoteTunnelInetAddress(java.net.InetAddress remoteTunnelInetAddr)
          InetAddress of the far end of an L2TP tunnel.
 void setRouterName(java.lang.String routerName)
          Set the router name
 void setRouterType(java.lang.String routerType)
          Set the router type
 void setServiceBundle(java.lang.String serviceBundle)
          Set the service bundle
 void setServiceIdentifier(long serviceIdentifier)
          Set the 3gpp Service Identifier attribute
 void setServiceName(java.lang.String serviceName)
          Set the Service Name
 void setServiceScope(java.util.Set<net.juniper.smgt.sae.service.Scope> scope, java.lang.String serviceName)
          Set the Service Scope
 void setServiceSessionName(java.lang.String sessionName)
          Set the Service Session Name
 void setServiceSessionTag(java.lang.String sessionTag)
          Set the Service Session Tag
 void setSessionId(java.lang.String theSessionId)
          Set the SessionId
 void setSessionTime(long sTime)
          Set the Session Time
 void setSessionTimeout(int timeout)
          Set the Session Timeout in seconds
 void setSubscriptionName(java.lang.String subscriptionName)
          Set the Subscription Name
 void setSubstitutions(java.util.List<java.lang.String> theSubstitutions)
          Set the substitutions of service, it's only available in sync event for plug-in recover lost substitution
 void setTerminateErrorCode(int theCause)
          Set the Terminate Error Code
 void setTotalOctets(long totalOctets)
          Set number of octets (sent/received) to the user (64bit)
 void setUpstreamBandwidth(int bandwidth)
          Set the Service up stream bandwidth
 void setUserDn(java.lang.String userDn)
          Set the LDAP distinguished name of the loaded user profile assigned to the user.
 void setUserInetAddress(java.net.InetAddress userInetAddr)
          Set the InetAddress associated with PPP or DHCP user.
 void setUserIpAddress(byte[] userIpAddr)
          Set the User IPv4 address
 void setUserIpMask(int userIpMask)
          Set the subscriber IP mask
 void setUserMacAddress(java.lang.String userMacAddr)
          Set MAC address of DHCP user.
 void setUserProperty(java.lang.String key, java.lang.String value)
          Get the property from user plug-in event.
 void setUserRadiusClass(java.lang.String[] userRadiusClass)
          Set the User Radius Class
 void setUserSessionHandle(java.lang.String userSessionHandle)
          Set the user session handle
 void setUserSessionId(java.lang.String userSessionId)
          Set the User SessionId
 void setUserType(java.lang.String userType)
          Set the user type.
 void setVpnId(java.lang.String vpnId)
          Set the vpn Id
 
Methods inherited from class net.juniper.smgt.sae.plugin.AbstractPluginEvent
decrementUse, incrementUse, join
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.juniper.smgt.sae.plugin.PluginEvent
decrementUse, incrementUse, join
 

Constructor Detail

ScriptServiceTrackingPluginEvent

public ScriptServiceTrackingPluginEvent(ServiceSessionInfo serviceSessionInfo)
create a service plug-in event instance

Parameters:
serviceSessionInfo -
Method Detail

getTerminateCause

public int getTerminateCause()
Get the Terminate Error Code

Specified by:
getTerminateCause in interface net.juniper.smgt.sae.plugin.StopTrackingPluginEvent
Returns:
The terminate cause of the service session

setTerminateErrorCode

public void setTerminateErrorCode(int theCause)
Set the Terminate Error Code

Parameters:
theCause - - Error code

getAccountingData

public AccountingData getAccountingData()
Get the Accounting Data

Returns:
null

getSessionId

public java.lang.String getSessionId()
Get the SessionId

Specified by:
getSessionId in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The session id.

setSessionId

public void setSessionId(java.lang.String theSessionId)
Set the SessionId

Parameters:
theSessionId- - service session ID

getSessionTimeout

public int getSessionTimeout()
Get the Session Timeout in seconds

Specified by:
getSessionTimeout in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
the Session Timeout in seconds

setSessionTimeout

public void setSessionTimeout(int timeout)
Set the Session Timeout in seconds

Specified by:
setSessionTimeout in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Parameters:
timeout- - Session Timeout in seconds

getServiceIdentifier

public long getServiceIdentifier()
Get the 3gpp Service Identifier attribute

Specified by:
getServiceIdentifier in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getServiceIdentifier in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getServiceIdentifier in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
the 3gpp Service Identifier attribute

setServiceIdentifier

public void setServiceIdentifier(long serviceIdentifier)
Set the 3gpp Service Identifier attribute

Specified by:
setServiceIdentifier in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
setServiceIdentifier in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
setServiceIdentifier in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Parameters:
serviceIdentifier- - 3gpp Service Identifier attribute

getInterimTime

public int getInterimTime()
Get the Interim Time in seconds

Specified by:
getInterimTime in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
the Interim Time in seconds

setInterimTime

public void setInterimTime(int interval)
Set the Interim Time in seconds

Specified by:
setInterimTime in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Parameters:
interval- - The interval, in seconds, between service interim records.

getServiceSessionName

public java.lang.String getServiceSessionName()
Get the Service Session Name

Specified by:
getServiceSessionName in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getServiceSessionName in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getServiceSessionName in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The session name.

setServiceSessionName

public void setServiceSessionName(java.lang.String sessionName)
Set the Service Session Name

Parameters:
sessionName- - Service Session Name

getServiceSessionTag

public java.lang.String getServiceSessionTag()
Get the Service Session Tag

Specified by:
getServiceSessionTag in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getServiceSessionTag in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getServiceSessionTag in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The session tag or "" if session tag is not initialized.

setServiceSessionTag

public void setServiceSessionTag(java.lang.String sessionTag)
Set the Service Session Tag

Parameters:
sessionTag- - Service Session Tag

getIfSessionId

public java.lang.String getIfSessionId()
Get the Interface Session Id

Specified by:
getIfSessionId in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
The Interface Session Id.

setIfSessionId

public void setIfSessionId(java.lang.String theIntfSessionId)
Set the Interface Session Id

Parameters:
theIntfSessionId- - Interface Session Id

getSubstitution

public java.lang.String[] getSubstitution()
Get the Substitution See the SSC Administration and Operations Guide for details about how substitutions affect service policies via paramater value aquisitions, and for detailed information about the format of the Strings that contain the substitutions. This method used by only start service tracking

Specified by:
getSubstitution in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Returns:
The substitutions used for the service session.

setSubstitutions

public void setSubstitutions(java.util.List<java.lang.String> theSubstitutions)
Set the substitutions of service, it's only available in sync event for plug-in recover lost substitution

Parameters:
theSubstitutions- - substitutions of service

setSubscriptionName

public void setSubscriptionName(java.lang.String subscriptionName)
Set the Subscription Name

Parameters:
subscriptionName - - service available for the subscriber as subscription.

getAuthUserId

public java.lang.String getAuthUserId()
This method is used only for auth event only.

Specified by:
getAuthUserId in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
null

setDomain

public void setDomain(java.lang.String theLoginName)
Set the Domain

Parameters:
theLoginName - - domain name is after the @ symbol from the loginname (e.g. jane@default, default is the domain name)

getDomain

public java.lang.String getDomain()
Get the Domain

Specified by:
getDomain in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
Returns the domain of the subscriber.

getSubscriptionName

public java.lang.String getSubscriptionName()
Get the Subscription Name

Specified by:
getSubscriptionName in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getSubscriptionName in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getSubscriptionName in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The subscription name activated for the subscriber.

getAggrSessionId

public java.lang.String getAggrSessionId()
This method is only for Aggregate services only

Specified by:
getAggrSessionId in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrSessionId in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrSessionId in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getAggrLoginName

public java.lang.String getAggrLoginName()
This method is only for Aggregate services only

Specified by:
getAggrLoginName in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrLoginName in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrLoginName in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getAggrUserDn

public java.lang.String getAggrUserDn()
This method is only for Aggregate services only

Specified by:
getAggrUserDn in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrUserDn in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrUserDn in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getAggrUserInetAddress

public java.net.InetAddress getAggrUserInetAddress()
This method is only for Aggregate services only

Specified by:
getAggrUserInetAddress in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrUserInetAddress in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrUserInetAddress in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getAggrAccountingId

public java.lang.String getAggrAccountingId()
This method is only for Aggregate services only

Specified by:
getAggrAccountingId in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrAccountingId in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrAccountingId in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getAggrAuthUserId

public java.lang.String getAggrAuthUserId()
This method is only for Aggregate services only

Specified by:
getAggrAuthUserId in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getAggrAuthUserId in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getAggrAuthUserId in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
null

getRadiusClass

public java.lang.String[] getRadiusClass()
Get the Radius Class

Specified by:
getRadiusClass in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
a List of String or null if no attributes are available.

setRadiusClass

public void setRadiusClass(java.lang.String[] radiusClass)
Set the Radius Class

Parameters:
radiusClass -

getUserRadiusClass

public java.lang.String[] getUserRadiusClass()
Get the User Radius Class

Specified by:
getUserRadiusClass in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getUserRadiusClass in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getUserRadiusClass in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The user radius class.

setUserRadiusClass

public void setUserRadiusClass(java.lang.String[] userRadiusClass)
Set the User Radius Class

Parameters:
userRadiusClass- - user session RADIUS class

getUserSessionId

public java.lang.String getUserSessionId()
Get the User SessionId

Specified by:
getUserSessionId in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getUserSessionId in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getUserSessionId in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The user session ID.

setUserSessionId

public void setUserSessionId(java.lang.String userSessionId)
Set the User SessionId

Parameters:
userSessionId - - user session ID for the service session

getServiceName

public java.lang.String getServiceName()
Get the Service Name

Specified by:
getServiceName in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getServiceName in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getServiceName in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The service name.

setServiceName

public void setServiceName(java.lang.String serviceName)
Set the Service Name

Parameters:
serviceName - - service name

getServiceScope

public java.lang.String getServiceScope()
Get the Service Scope To get service scope, needs the Service object

Specified by:
getServiceScope in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getServiceScope in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getServiceScope in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns the Service Scope

setServiceScope

public void setServiceScope(java.util.Set<net.juniper.smgt.sae.service.Scope> scope,
                            java.lang.String serviceName)
Set the Service Scope

Parameters:
scope - - service scope
serviceName - - service name

getManagerId

public java.lang.String getManagerId()
Get the Manager ID

Specified by:
getManagerId in interface net.juniper.smgt.sae.plugin.TrackingPluginEvent
Returns:
null

getInOctets

public long getInOctets()
Get number of octets received from user (64bit)

Specified by:
getInOctets in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getInOctets in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns the number of octets received from user

setInOctets

public void setInOctets(long inOctets)
Set number of octets received from user (64bit)

Parameters:
inOctets - - number of octets received from user (64bit)

getOutOctets

public long getOutOctets()
Get number of octets sent to user (64bit)

Specified by:
getOutOctets in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getOutOctets in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns number of octets sent to user

setOutOctets

public void setOutOctets(long outOctets)
Set number of octets sent to user (64bit)

Parameters:
outOctets - - number of octets sent to user (64bit)

getTotalOctets

public long getTotalOctets()
Get number of total octets (sent/received) to the user (64bit)

Specified by:
getTotalOctets in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getTotalOctets in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns number of octets sent to user

setTotalOctets

public void setTotalOctets(long totalOctets)
Set number of octets (sent/received) to the user (64bit)

Parameters:
outOctets - - number of octets sent to user (64bit)

getInPackets

public long getInPackets()
Get the number of packets transfered from this service

Specified by:
getInPackets in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getInPackets in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
the number of packets transfered from this service

setInPackets

public void setInPackets(long packets_in)
Set the number of packets transfered from this service

Parameters:
packets_in - - The number of packets transfered from this service

getOutPackets

public long getOutPackets()
Get the number of packets transfered from this service

Specified by:
getOutPackets in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getOutPackets in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
the number of packets transfered from this service

setOutPackets

public void setOutPackets(long packets_out)
Set the number of packets transfered from this service

Parameters:
packets_out - - The number of packets transfered from this service

getDownstreamBandwidth

public int getDownstreamBandwidth()
Get the Service Downstream Bandwidth

Specified by:
getDownstreamBandwidth in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getDownstreamBandwidth in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getDownstreamBandwidth in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The service down stream bandwidth for the service session or -1 if down stream bandwidth is not initialized.

setDownstreamBandwidth

public void setDownstreamBandwidth(int bandwidth)
set the Service Downstream Bandwidth

Parameters:
bandwidth - - Service down stream bandwidth

getUpstreamBandwidth

public int getUpstreamBandwidth()
Get the Service up stream bandwidth

Specified by:
getUpstreamBandwidth in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getUpstreamBandwidth in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getUpstreamBandwidth in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
The service up stream bandwidth for the service session or -1 if up stream bandwidth is not initialized.

setUpstreamBandwidth

public void setUpstreamBandwidth(int bandwidth)
Set the Service up stream bandwidth

Parameters:
bandwidth - - Service up stream bandwidth

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
The method setProperty can be used to set arbitrary attributes required by the event. Accepts two string parameters, one as key and other as value. These parameters will be set in the SessionProperties which will be used before publishing the event by SAE.

Parameters:
key - - custom attribute name
value - - custom attribute value

getProperty

public java.lang.String[] getProperty()
Get the Property used to get arbitrary attributes from SessionProperties

Specified by:
getProperty in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Returns the arbitrary attributes

getUserProperty

public java.lang.String[] getUserProperty()
Get the property from user plug-in event.

Specified by:
getUserProperty in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getUserProperty in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getUserProperty in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns the user property attributes

setUserProperty

public void setUserProperty(java.lang.String key,
                            java.lang.String value)
Get the property from user plug-in event.

Parameters:
key - - the attribute name
value - - the attribute value

getUserSessionProperties

public net.juniper.smgt.sae.session.SessionProperties getUserSessionProperties()
Get the session properties from user plug-in event.

Specified by:
getUserSessionProperties in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getUserSessionProperties in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getUserSessionProperties in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
the session properties from user

getSessionTime

public int getSessionTime()
Get the Session time

Specified by:
getSessionTime in interface net.juniper.smgt.sae.plugin.InterimTrackingPluginEvent
Specified by:
getSessionTime in interface net.juniper.smgt.sae.plugin.StopTrackingPluginEvent
Returns:
the Session time

setSessionTime

public void setSessionTime(long sTime)
Set the Session Time

Parameters:
sTime - - session time in milliseconds.

getOperational

public int getOperational()
This method is not for Start service tracking. Used only by Interim and Stop Service tracking 0=not operational, 1=operational

Specified by:
getOperational in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getOperational in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent
Returns:
Returns 0=not operational, 1=operational

setOperational

public void setOperational(int operational)
Set operational

Parameters:
operational - 0=not operational, 1=operational

getHostName

public java.lang.String getHostName()
Get the Host name

Specified by:
getHostName in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The host name.

setHostName

public void setHostName(java.lang.String hostName)
Set the Host name

Parameters:
hostName - - Host name

getRouterName

public java.lang.String getRouterName()
get the router name

Specified by:
getRouterName in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The router name.

setRouterName

public void setRouterName(java.lang.String routerName)
Set the router name

Parameters:
routerName - - name of the router

getInterfaceName

public java.lang.String getInterfaceName()
Get the name of the interface through which subscriber comes in

Specified by:
getInterfaceName in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The interface name.

setInterfaceName

public void setInterfaceName(java.lang.String interfaceName)
Set the interface name through which subscriber comes in

Parameters:
interfaceName - - interface name

getInterfaceAlias

public java.lang.String getInterfaceAlias()
Get the interface alias, i.e. alternative description of managed interface.

Specified by:
getInterfaceAlias in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The interface alias or "" if it is not available.

setInterfaceAlias

public void setInterfaceAlias(java.lang.String interfaceAlias)
Set the interface alias, i.e. alternative description of managed interface.

Parameters:
interfaceAlias - - interface alias

getInterfaceDescr

public java.lang.String getInterfaceDescr()
Get Interface Description

Specified by:
getInterfaceDescr in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The interface description or "" if it is not available.

setInterfaceDescr

public void setInterfaceDescr(java.lang.String interfaceDesc)
Set Interface Description

Parameters:
interfaceDesc - - interface description

getInterfaceSpeed

public long getInterfaceSpeed()
Get the interface speed

Specified by:
getInterfaceSpeed in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The interface speed

setInterfaceSpeed

public void setInterfaceSpeed(long speed)
Set the Interface speed

Parameters:
speed - - Interface speed

getPortId

public java.lang.String getPortId()
Get NAS-Port-ID, i.e. a name of the interface including layer 2 access information. The NAS-Port-ID field is used in RADIUS messages concerning the interface

Specified by:
getPortId in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The NAS-Port-ID or null if it is not available.

setPortId

public void setPortId(java.lang.String portId)
Set the NAS-Port-ID

Parameters:
portId - - Nas Port Id

getNasPort

public int getNasPort()
Get NAS-Port, i.e. a numerical index that identifies the layer 2 interface.

Specified by:
getNasPort in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
NAS-Port or zero if it is not available.

setNasPort

public void setNasPort(int nasPort)
Set NAS-Port, i.e. a numerical index that identifies the layer 2 interface.

Parameters:
nasPort - - Nas port

getNasIp

public int getNasIp()
Get the ERX IP Address

Specified by:
getNasIp in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Converts IP from byte array to int type following big-endian order

setNasIp

public void setNasIp(byte[] nasIp)
Set the ERX IP Address in byte array

Parameters:
nasIp - -ERX IP Address

getUserIpAddress

public int getUserIpAddress()
Get the User IPv4 address

Specified by:
getUserIpAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the User IPv4 address

setUserIpAddress

public void setUserIpAddress(byte[] userIpAddr)
Set the User IPv4 address

Parameters:
userIpAddr- - User IPv4 address

getIfRadiusClass

public java.lang.String[] getIfRadiusClass()
Get all values of interface-radius class.

Specified by:
getIfRadiusClass in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The RadiusClass or null if it is not available.

getServiceBundle

public java.lang.String getServiceBundle()
Get the service bundle, which is only available for PPP and authenticated DHCP addresses.

Specified by:
getServiceBundle in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The service bundle

setServiceBundle

public void setServiceBundle(java.lang.String serviceBundle)
Set the service bundle

Parameters:
serviceBundle- - service bundle for the subscriber

getLoginName

public java.lang.String getLoginName()
Get the subscriber login name

Specified by:
getLoginName in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The user's login name or null if it is not available.

setLoginName

public void setLoginName(java.lang.String loginName)
Set the subscriber Login Name

Parameters:
loginName - - subscriber login name

getPrimaryUserName

public java.lang.String getPrimaryUserName()
Get the primary user name.

Specified by:
getPrimaryUserName in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The primary user name or an empty string, if the primary login was unauthenticated.

setPrimaryUserName

public void setPrimaryUserName(java.lang.String primaryUsername)
The primary user name is the name that was used to authenticate the transport interface of the user. For example if the user session is an authenticated PPP session, the primary user name is the PPP login name of the user.

Parameters:
primaryUsername- - name that was used to authenticate

getAccountingId

public java.lang.String getAccountingId()
Get the user accounting ID.

Specified by:
getAccountingId in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The accounting ID or null if it is not known.

setAccountingId

public void setAccountingId(java.lang.String acctId)
Set the user accounting ID.

Parameters:
acctId - -user accounting ID

getUserDn

public java.lang.String getUserDn()
Get the LDAP distinguished name of the loaded user profile assigned to the user.

Specified by:
getUserDn in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The user DN.

setUserDn

public void setUserDn(java.lang.String userDn)
Set the LDAP distinguished name of the loaded user profile assigned to the user.

Parameters:
userDn - - The user DN

getEventTime

public int getEventTime()
The event time is calculated from evenTimemilliSeconds

Specified by:
getEventTime in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
- Returns the event Time

getEventTimeMillisecond

public long getEventTimeMillisecond()
Get the event time in milli seconds

Specified by:
getEventTimeMillisecond in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
-Returns the event Time milliseconds

getUserMacAddress

public java.lang.String getUserMacAddress()
Get MAC address of DHCP user.

Specified by:
getUserMacAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The user MAC address.

setUserMacAddress

public void setUserMacAddress(java.lang.String userMacAddr)
Set MAC address of DHCP user.

Parameters:
userMacAddr- - MAC address

getDhcpPacket

public byte[] getDhcpPacket()
Get DHCP options returned for DHCP users.

Specified by:
getDhcpPacket in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The DHCP options.

setDhcpPacket

public void setDhcpPacket(byte[] dhcpPacket)
Set DHCP options returned for DHCP users.

Parameters:
dhcpPacket - -DHCP packet

getUserType

public java.lang.String getUserType()
Get the user type.

Specified by:
getUserType in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Return the user type.

setUserType

public void setUserType(java.lang.String userType)
Set the user type.

Parameters:
userType - -user type

getUserSessionHandle

public java.lang.String getUserSessionHandle()
Get the user session handle

Specified by:
getUserSessionHandle in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the user session handle (e.g. "SAE:jane:1113315547138:0@vr1").

setUserSessionHandle

public void setUserSessionHandle(java.lang.String userSessionHandle)
Set the user session handle

Parameters:
userSessionHandle - - owner + VirtualRouter + accounting session id (e.g. "SAE:jane:1113315547138:0@vr1").

getUserInetAddress

public java.net.InetAddress getUserInetAddress()
Get the InetAddress associated with PPP or DHCP user.

Specified by:
getUserInetAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The user InetAddress or null if it is not known.

setUserInetAddress

public void setUserInetAddress(java.net.InetAddress userInetAddr)
Set the InetAddress associated with PPP or DHCP user.

Parameters:
userInetAddr - - user InetAddress

getNasInetAddress

public java.net.InetAddress getNasInetAddress()
Get the IP address the virtual router uses for accounting purposes.

Specified by:
getNasInetAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
The IP addess or null if it is not available.

setNasInetAddress

public void setNasInetAddress(java.net.InetAddress nasInetAddr)
Set the IP address the virtual router uses for accounting purposes.

Parameters:
nasInetAddr - -IP address the virtual router

getRouterType

public java.lang.String getRouterType()
Get the router type

Specified by:
getRouterType in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Returns the router type

setRouterType

public void setRouterType(java.lang.String routerType)
Set the router type

Parameters:
routerType - - router type

getCallingStationId

public java.lang.String getCallingStationId()
Get Calling-Station-Id associated with the primary interface

Specified by:
getCallingStationId in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the calling-station-id

setCallingStationId

public void setCallingStationId(java.lang.String stationId)
Set Calling-Station-Id associated with the primary interface

Parameters:
stationId- - Calling-Station-Id

getSessionProperties

public net.juniper.smgt.sae.session.SessionProperties getSessionProperties()
Return the SessionPoperties

Specified by:
getSessionProperties in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Return the SessionPoperties

getLocalQosProfile

public java.lang.String[] getLocalQosProfile()
Get the local qos profiles as String[]

Specified by:
getLocalQosProfile in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
Returns the local qos profiles

setLocalQosProfile

public void setLocalQosProfile(java.lang.String[] localQosProfile)
Set the local qos profiles as String[]

Parameters:
localQosProfile - - local qos profiles

getLocalQosProfiles

public net.juniper.smgt.sae.session.SessionProperties getLocalQosProfiles()
Get the local qos profiles as Session properties

Specified by:
getLocalQosProfiles in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
A map of the local qos profiles if reported by router. key is the layer the qos profile is attached at and the value is the profile name.

setLocalQosProfiles

public void setLocalQosProfiles(java.util.TreeSet localQosProfile)
Set the local qos profiles as Session properties

Parameters:
localQosProfile - - local qos profiles

getVpnId

public java.lang.String getVpnId()
Get the vpn Id

Specified by:
getVpnId in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the vpn Id

setVpnId

public void setVpnId(java.lang.String vpnId)
Set the vpn Id

Parameters:
vpnId - - vpn Id

getRemoteTunnelInetAddress

public java.net.InetAddress getRemoteTunnelInetAddress()
InetAddress of the far end of an L2TP tunnel.

Specified by:
getRemoteTunnelInetAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the InetAddress of the far end of an L2TP connection

setRemoteTunnelInetAddress

public void setRemoteTunnelInetAddress(java.net.InetAddress remoteTunnelInetAddr)
InetAddress of the far end of an L2TP tunnel.

Parameters:
remoteTunnelInetAddr - - InetAddress of the far end

getLocalTunnelInetAddress

public java.net.InetAddress getLocalTunnelInetAddress()
InetAddress of the local end of an L2TP tunnel.

Specified by:
getLocalTunnelInetAddress in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the InetAddress of the far end of an L2TP connection

setLocalTunnelInetAddress

public void setLocalTunnelInetAddress(java.net.InetAddress localTunnelInetAddr)
InetAddress of the local end of an L2TP tunnel. If the subscriber interface is an L2TP(LAC) interface, the field contains the address of the LAC. If the subscriber interface is an IP interface on top of an LNS, the field contains the address of the LNS.

Parameters:
localTunnelInetAddr - - InetAddress of the local end

getUserIpMask

public int getUserIpMask()
Get the Subscriber IP mask

Specified by:
getUserIpMask in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the Subscriber IP mask

setUserIpMask

public void setUserIpMask(int userIpMask)
Set the subscriber IP mask

Parameters:
userIpMask - - subscriber IP mask

getFramedIpv6Prefix

public byte[] getFramedIpv6Prefix()
Get the framed IPv6 prefix

Specified by:
getFramedIpv6Prefix in interface net.juniper.smgt.sae.plugin.PluginEvent
Returns:
the framed IPv6 prefix

setFramedIpv6Prefix

public void setFramedIpv6Prefix(byte[] framedIpv6Prefix)
Set the framed IPv6 prefix

Parameters:
framedIpv6Prefix - - framed IPv6 prefix

getDelegatedIpv6Prefix

public java.util.Collection getDelegatedIpv6Prefix()
Returns delegated IPv6 prefix

Specified by:
getDelegatedIpv6Prefix in interface net.juniper.smgt.sae.plugin.PluginEvent

isSyncStopEvent

public boolean isSyncStopEvent()
Specified by:
isSyncStopEvent in interface net.juniper.smgt.sae.plugin.PluginEvent

setRatingGroup

public void setRatingGroup(long ratingGroup)

getRatingGroup

public long getRatingGroup()
Specified by:
getRatingGroup in interface net.juniper.smgt.sae.plugin.InterimServiceTrackingPluginEvent
Specified by:
getRatingGroup in interface net.juniper.smgt.sae.plugin.StartServiceTrackingPluginEvent
Specified by:
getRatingGroup in interface net.juniper.smgt.sae.plugin.StopServiceTrackingPluginEvent

Core API 7.15