Package com.opencloud.sentinel.util
Class LegSubscriptionID
- java.lang.Object
-
- com.opencloud.sentinel.util.LegSubscriptionID
-
- All Implemented Interfaces:
LegUsageID,com.opencloud.util.FastSerializable
public final class LegSubscriptionID extends java.lang.Object implements LegUsageID
Represents a subscribed SIP event on a particularLeg
-
-
Constructor Summary
Constructors Constructor Description LegSubscriptionID(java.io.DataInput in)Constructs a new LegSubscriptionID object by deserializing data from a stream that was written bytoStream(java.io.DataOutput).LegSubscriptionID(java.lang.String legName, SubscribedEventID eventID)Create a newLegSubscriptionID
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static LegSubscriptionIDfromString(java.lang.String s)Get aLegSubscriptionIDfrom a string.SubscribedEventIDgetEventID()Returns theSubscribedEventIDassociated with this ID.java.lang.StringgetLegName()Returns the Leg Name associated with this IDinthashCode()voidtoStream(java.io.DataOutput out)Serializes this object to a stream in a form suitable for reading byLegSubscriptionID(java.io.DataInput).java.lang.StringtoString()
-
-
-
Constructor Detail
-
LegSubscriptionID
public LegSubscriptionID(java.lang.String legName, SubscribedEventID eventID)Create a newLegSubscriptionID- Parameters:
legName- Leg Name associated with this IDeventID- theSubscribedEventIDassociated with this ID
-
LegSubscriptionID
public LegSubscriptionID(java.io.DataInput in) throws java.io.IOExceptionConstructs a new LegSubscriptionID object by deserializing data from a stream that was written bytoStream(java.io.DataOutput).- Parameters:
in- input stream.- Throws:
java.io.IOException
-
-
Method Detail
-
fromString
public static LegSubscriptionID fromString(java.lang.String s)
Get aLegSubscriptionIDfrom a string.- Parameters:
s- a string in the form<leg-name>/<event-name>[;id=<id>]- Returns:
- a new
LegSubscriptionIDinstance
-
toStream
public void toStream(java.io.DataOutput out) throws java.io.IOExceptionSerializes this object to a stream in a form suitable for reading byLegSubscriptionID(java.io.DataInput).- Specified by:
toStreamin interfacecom.opencloud.util.FastSerializable- Parameters:
out- the stream to write to- Throws:
java.io.IOException- if an I/O error occurs
-
getLegName
public java.lang.String getLegName()
Returns the Leg Name associated with this ID- Specified by:
getLegNamein interfaceLegUsageID- Returns:
- Leg Name.
-
getEventID
public SubscribedEventID getEventID()
Returns theSubscribedEventIDassociated with this ID.- Returns:
- the
SubscribedEventID.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-