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 boolean
equals(java.lang.Object obj)
static LegSubscriptionID
fromString(java.lang.String s)
Get aLegSubscriptionID
from a string.SubscribedEventID
getEventID()
Returns theSubscribedEventID
associated with this ID.java.lang.String
getLegName()
Returns the Leg Name associated with this IDint
hashCode()
void
toStream(java.io.DataOutput out)
Serializes this object to a stream in a form suitable for reading byLegSubscriptionID(java.io.DataInput)
.java.lang.String
toString()
-
-
-
Constructor Detail
-
LegSubscriptionID
public LegSubscriptionID(java.lang.String legName, SubscribedEventID eventID)
Create a newLegSubscriptionID
- Parameters:
legName
- Leg Name associated with this IDeventID
- theSubscribedEventID
associated with this ID
-
LegSubscriptionID
public LegSubscriptionID(java.io.DataInput in) throws java.io.IOException
Constructs 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 aLegSubscriptionID
from a string.- Parameters:
s
- a string in the form<leg-name>/<event-name>[;id=<id>]
- Returns:
- a new
LegSubscriptionID
instance
-
toStream
public void toStream(java.io.DataOutput out) throws java.io.IOException
Serializes this object to a stream in a form suitable for reading byLegSubscriptionID(java.io.DataInput)
.- Specified by:
toStream
in 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:
getLegName
in interfaceLegUsageID
- Returns:
- Leg Name.
-
getEventID
public SubscribedEventID getEventID()
Returns theSubscribedEventID
associated with this ID.- Returns:
- the
SubscribedEventID
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-