Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class PortListItem

java.lang.Object
  extended by com.pcube.apps.engage.common.ArrayElement
      extended by com.pcube.apps.engage.common.ListItem
          extended by com.pcube.apps.engage.policy.PortListItem
All Implemented Interfaces:
Formattable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class PortListItem
extends ListItem
implements java.io.Serializable, Formattable

An item that is in a port list. A port item has a port number and the transport type (UDP, TCP or both).

See Also:
TRANSPORT_TYPE_TCP, TRANSPORT_TYPE_UDP, TRANSPORT_TYPE_BOTH, TRANSPORT_TYPE_IP, Serialized Form

Field Summary
static int TRANSPORT_TYPE_BOTH
          Protocol transport types are both TCP and UDP.
static int TRANSPORT_TYPE_IP
          Protocol transport type is IP.
static int TRANSPORT_TYPE_TCP
          Protocol transport type is TCP.
static int TRANSPORT_TYPE_UDP
          Protocol transport type is UDP.
 
Constructor Summary
PortListItem()
          PortListItem Constructor.
PortListItem(long port, int transportType)
          PortListItem Constructor.
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object o)
           
 void fromStream(java.io.BufferedReader in, Formatter f)
          Method fromStream
 long getPortNumber()
          Gets this PortListItem's port.
 int getTransportType()
          Gets this PortListItem's transport type.
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSPORT_TYPE_BOTH

public static final int TRANSPORT_TYPE_BOTH
Protocol transport types are both TCP and UDP.

See Also:
Constant Field Values

TRANSPORT_TYPE_IP

public static final int TRANSPORT_TYPE_IP
Protocol transport type is IP.

See Also:
Constant Field Values

TRANSPORT_TYPE_TCP

public static final int TRANSPORT_TYPE_TCP
Protocol transport type is TCP.

See Also:
Constant Field Values

TRANSPORT_TYPE_UDP

public static final int TRANSPORT_TYPE_UDP
Protocol transport type is UDP.

See Also:
Constant Field Values
Constructor Detail

PortListItem

public PortListItem()
PortListItem Constructor.


PortListItem

public PortListItem(long port,
                    int transportType)
PortListItem Constructor.

Parameters:
port - this PortListItem's port
transportType - this PortListItem's transport type
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in class ListItem
See Also:
ListItem.clone()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable
Specified by:
compareTo in class ListItem
See Also:
ListItem.compareTo(java.lang.Object)

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Description copied from interface: Formattable
Method fromStream

Specified by:
fromStream in interface Formattable
Throws:
ImportExportException
See Also:
Formattable.fromStream(java.io.BufferedReader, com.pcube.apps.engage.common.Formatter)

getPortNumber

public long getPortNumber()
Gets this PortListItem's port.

Returns:
this PortListItem's port

getTransportType

public int getTransportType()
Gets this PortListItem's transport type.

Returns:
this PortListItem's transport type
See Also:
TRANSPORT_TYPE_TCP, TRANSPORT_TYPE_UDP, TRANSPORT_TYPE_BOTH, TRANSPORT_TYPE_IP

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Description copied from interface: Formattable
Method toStream

Specified by:
toStream in interface Formattable
See Also:
Formattable.toStream(java.io.PrintStream, com.pcube.apps.engage.common.Formatter)

toString

public java.lang.String toString()
Specified by:
toString in class ListItem
See Also:
ListItem.toString()

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.