This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2014-193517 filed Sep. 24, 2014.
1. Technical Field
The present invention relates to an image forming apparatus, a processing method, and a non-transitory computer readable medium.
2. Related Art
An information processing apparatus may include plural communication interfaces and may be used such that the plural communication interfaces are connected to plural communication networks different from one another. For example, Windows (registered trademark) loaded in an information processing apparatus has a single routing table, which is information about communication paths including plural communication interfaces, and selects, from among the communication paths indicated in the routing table, a communication path which includes a small number of routers or a communication path which enables high speed and high reliability. That is, a communication interface that is most suitable for a communication partner is selected.
According to an aspect of the invention, there is provided an image forming apparatus including plural communication interfaces, a network service executing unit, a type-of-network determining unit, and a communication interface selecting unit. The network service executing unit executes at least one network service. The type-of-network determining unit determines types of communication networks respectively connected to the plural communication interfaces. The communication interface selecting unit selects, in accordance with a type of a communication network used in the at least one network service, a communication interface to be used in the at least one network service from among the plural communication interfaces.
An exemplary embodiment of the present invention will be described in detail based on the following figures, wherein:
Hereinafter, an exemplary embodiment of the present invention will be described with reference to the drawings. In the individual figures attached to this specification, the same elements as those illustrated in a figure that has already been described are denoted by the same reference numerals, and the detailed description thereof may be omitted.
The image forming apparatus 1 is, for example, a so-called multifunction peripheral having a facsimile function, a scanner function, and so forth, and includes a controller 11 such as a microprocessor, a memory 12 including a random access memory (RAM) and a hard disk drive, plural communication interfaces 13, an input unit 14 including a mouse, keyboard, and touch panel that accept input from a user, and a display unit 15 such as a display. Here, the memory 12 of the image forming apparatus 1 stores a program for selecting a communication interface 13 that is to be used for communication with a specific communication partner. The controller 11 of the image forming apparatus 1 executes various information processing operations for selecting the communication interface 13 in accordance with the program stored in the memory 12. The program may be supplied to the image forming apparatus 1 via an information storage medium such as a flash memory, or via a communication network such as the Internet.
The plural communication interfaces 13 included in the image forming apparatus 1 are connected to different communication networks. Each of the communication interfaces 13 is connected to the Internet and/or a local area network (hereinafter also referred to as an intranet), as illustrated in
Each of the information processing apparatuses 2 as a communication partner that communicates with the image forming apparatus 1 is, for example, a server, a personal computer, a mobile phone such as a smartphone, or a tablet terminal. The information processing apparatus 2 includes a controller, a memory, a communication unit, and so forth, like the image forming apparatus 1. The controller of the information processing apparatus 2 executes processing for communicating with the image forming apparatus 1 in accordance with the program stored in the memory of the information processing apparatus 2 or a network service provided in the image forming apparatus 1.
Each of the information processing apparatuses 2 as a communication partner is connected to the image forming apparatus 1 via any one of plural communication networks. In the exemplary embodiment, each communication partner is connected to either of the Internet and the intranet, as illustrated in
The image forming apparatus 1 according to the exemplary embodiment selects a communication interface 13 capable of communicating with a communication partner that is used in one of various network services. Hereinafter, a detailed description will be given of the function of the image forming apparatus 1 for selecting the communication interface 13.
The interface information memory 110 stores information about the plural communication interfaces 13 included in the image forming apparatus 1 (hereinafter also referred to as interface information). The interface information memory 110 may include the memory 12 of the image forming apparatus 1.
The service information memory 120 stores information about at least one network service provided in the image forming apparatus 1 (hereinafter also referred to as service information). The service information memory 120 may include the memory 12 of the image forming apparatus 1.
The type-of-network determining unit 130 determines the types of communication networks respectively connected to the plural communication interfaces 13 included in the image forming apparatus 1. The type-of-network determining unit 130 determines that, for each of the communication interfaces 13, the type of the communication network connected to the communication interface 13 is the Internet, an intranet, or both of them, and records a result of the determination in “type of network” in the interface information (see
More specifically, the type-of-network determining unit 130 determines the type of a communication network in accordance with a result of a connection test performed for a communication partner that is predetermined for the type of the communication network. The type-of-network determining unit 130 performs a connection test (for example, a connection test using ping) to determine whether or not the communication interface 13 is capable of connecting to a specific communication partner over the Internet. In a case where the connection test is a success, the type-of-network determining unit 130 determines that the type of the communication network connected to the communication interface 13 is the Internet. Also, the type-of-network determining unit 130 performs a connection test to determine whether or not the communication interface 13 is capable of connecting to a specific communication partner over the intranet. In a case where the connection test is a success, the type-of-network determining unit 130 determines that the type of the communication network is the intranet.
In a case where an IP address is assigned to the communication interface 13 or in a case where the IP address is updated, the type-of-network determining unit 130 determines the type of the communication network connected to the communication interface 13. Here, an IP address is assigned by a dynamic host configuration protocol (DHCP) server (not illustrated) that is connected via a communication network (specifically, the Internet or an intranet), and is updated by the DHCP server when it expires. The type-of-network determining unit 130 may determine that the type of the communication network is the Internet or an intranet at the time when an IP address is assigned to the communication interface 13.
The type-of-network determining unit 130 may determine, in a case where the IP address assigned to the communication interface 13 satisfies a predetermined condition, that the type of the communication network connected to the communication interface 13 is a first type (for example, an intranet), and may determine, in a case where the IP address does not satisfy the predetermined condition, that the type of the communication network is a second type (for example, the Internet). Here, the predetermined condition may be whether the assigned IP address is within the range of a predetermined threshold (for example, from 192.168.0.1 to 192.168.254.254 ) or whether a network portion of the IP address matches a predetermined value.
In a case where an IP address is not assigned to the communication interface 13, the type-of-network determining unit 130 may determine that the communication interface 13 is not connected to either of the Internet and the intranet.
The communication interface setting unit 140 sets, in accordance with the type of a communication network that is set for a communication partner used in a network service, the communication interface 13 capable of communicating with the communication partner. The communication interface setting unit 140 records, for example, the communication interface 13 connected to the communication network of the communication partner as the communication interface 13 in the service information (see
More specifically, the communication interface setting unit 140 sets, for the communication partner for which the type of network is the Internet, the communication interface 13 that has been determined to be connected to the Internet, and sets, for the communication partner for which the type of network is the intranet, the communication interface 13 that has been determined to be connected to the intranet.
The communication interface setting unit 140 further sets, in accordance with a result of a communication test that is predetermined for a network service and a communication partner, the communication interface 13 that is to be used by the communication partner. Here, a communication test is a test that is performed to determine whether or not communication with a communication partner is actually able to be performed in accordance with a procedure and a communication protocol that are predetermined for a network service.
For example, in a case where a network service is “ScanToEmail”, the communication interface setting unit 140 performs a communication test for a communication partner in accordance with an SMTP protocol. Specifically, the communication interface setting unit 140 transmits an HELO command, an EHLO command, or the like to the communication partner via the communication interface 13. In a case where a response is received from the communication partner, the communication interface setting unit 140 determines that the communication test is a success, and sets, for the communication partner of the network service “ScanToEmail”, the communication interface 13 that has been used for transmitting the command.
In a case where the type of network in the interface information (see
The communication interface setting unit 140 according to the exemplary embodiment sets the communication interfaces 13 to the service information and records the dates and times of update of the setting. In a case where the communication interface 13 corresponding to the type of network does not exist, or in a case where the communication interface 13 that has succeeded in a communication test does not exist, the communication interface setting unit 140 abandons the setting of the communication interfaces 13 in the service information, and records only the dates and times of update of the setting.
The network service executing unit 180 executes at least one network service that is provided in the image forming apparatus 1. The network service executing unit 180 executes, for example, a network service selected by a user via the input unit 14 of the image forming apparatus 1 among the network services recorded in the service information (see
The communication interface selecting unit 190 selects the communication interface 13 that is set, in the service information (see
The communication interface selecting unit 190 selects, further in accordance with a result of a communication test that is predetermined for a network service, the communication interface 13 to be used in the network service. For example, in a case where the network service executed by the network service executing unit 180 is a network service related to mail distribution (specifically, “ScanToEmail”), the communication interface selecting unit 190 selects the communication interface 13 connected to a communication network of a type that is predetermined for a communication partner, such as a mail server, that has succeeded in a communication test.
In a case where plural communication partners exist in a network service, the communication interface selecting unit 190 selects any of the communication interfaces 13 set for the communication partners as the communication interface 13 to be used in the network service.
In this case, the communication interface selecting unit 190 selects the communication interface 13 to be used in the network service further in accordance with priorities, for individual types of communication networks, that are predetermined for the network service (policy information). More specifically, the communication interface selecting unit 190 causes the display unit 15 of the image forming apparatus 1 to display information about individual communication partners such that the information is sorted in accordance with the policy information set for the network service in the service information (see
For example, in a case where policy information set for a network service represents “Internet priority”, the communication interface selecting unit 190 causes the display unit 15 to display communication partners by sorting them such that the types of network thereof are displayed in the order of the Internet and intranet, and accepts selection performed by the user. In this case, the communication partner for which the type of network is the intranet is not necessarily displayed.
In a case where plural communication partners exist in a network service and in a case where policy information is not set for the network service, the communication interface selecting unit 190 selects the communication interface 13 to be used in the network service further in accordance with priorities that are predetermined for the communication interfaces 13. The communication interface selecting unit 190 selects, for example, the communication interface 13 of the highest priority from among the communication interfaces 13 set for the plural communication partners.
In this way, the communication interface selecting unit 190 selects the communication interface 13 capable of communicating with a communication partner that is to be used in a network service.
Hereinafter, an example of processing executed by the image forming apparatus 1 according to the exemplary embodiment will be described with reference to the flowcharts illustrated in
As illustrated in
If the Internet connection test is a success (YES in step S301), it is considered that the IP address has been assigned by a DHCP server connected to the Internet or an intranet. Thus, at this time, it is not clear whether or not the communication interface 13 is connectable to the intranet. Thus, the type-of-network determining unit 130 performs, for the communication interface 13, a connection test for a specific communication partner connected to the intranet (intranet connection test) in step S303. If the intranet connection test is a failure (NO in step S303), the type-of-network determining unit 130 determines in step S304 that the type of the network connected to the communication interface 13 is the Internet. If the intranet connection test is a success (YES in step S303), the type-of-network determining unit 130 determines in step S305 that the type of the network connected to the communication interface 13 includes the Internet and intranet. Also, the type-of-network determining unit 130 updates the type of network and the date and time of update of the IP address in the interface information (see
Referring back to
The communication interface setting unit 140 determines, regarding the network service for which the setting is initialized in step S401, whether or not the interface information (see
If the communication test for the communication interface 13 is a success (YES in step S404), the communication interface setting unit 140 sets, for the communication partner indicated by the service information (see
If the communication test is a failure (NO in step S404), the communication interface setting unit 140 determines in step S402 whether or not there is another communication interface 13 connected to the communication network of the communication partner. If there is not another communication interface 13 connected to the communication network of the communication partner (NO in step S402), the communication interface setting unit 140 updates the date and time of update of setting without setting the communication interface 13 to the communication partner, and ends the communication interface setting processing.
In this way, the communication interfaces 13 capable of communicating with the communication partners in the individual network services are set in the service information (see
If the number of access destinations is one (1 in step S203), the communication interface selecting unit 190 selects the communication interface 13 set for this communication partner as the communication interface 13 to be used in the network service in step S204, and the network service executing unit 180 executes the network service in step S211. In the network service to be executed, the selected communication interface 13 is used for communication with the communication partner.
If the number of access destinations is zero (0 in step S203), the communication interface selecting unit 190 notifies the user of the image forming apparatus 1 of an error (specifically, information indicating that the network service is not available) in step S205.
If the number of access destinations is two or more (2 or more in step S203), the communication interface selecting unit 190 determines in step S206 whether or not the type of communication network taking priority (policy information) has been set for the network service. If the policy information has not been set for the network service (NO in step S206), the communication interface selecting unit 190 selects a communication interface 13 in accordance with the priorities of the individual communication interfaces 13 set in the interface information (see
If the policy information has been set for the network service (YES in step S206), the communication interface selecting unit 190 notifies the user of the image forming apparatus 1 of plural communication partners in the network service such that the communication partners are sorted in accordance with the policy information in step S208. The communication interface selecting unit 190 resorts the communication partners in accordance with the priorities of the types of networks indicated by the policy information (specifically, Internet priority or intranet priority) and causes the display unit 15 of the image forming apparatus 1 to display the communication partners.
In step S209, the communication interface selecting unit 190 accepts, from the user, selection from among the communication partners that the user is notified of in step S208. If the selection of a communication partner is accepted (YES in step S209), the communication interface selecting unit 190 selects the communication interface 13 set for the selected communication partner as the communication interface 13 that is to be used in the network service in step S210, and executes the network service in step S211.
In this way, in the image forming apparatus 1, in accordance with a network service to be executed, a communication interface 13 capable of communicating with a communication partner that is to be used in this network service is selected.
An exemplary embodiment of the present invention has been described above, but the present invention is not limited to the above-described exemplary embodiment. For example, according to the exemplary embodiment, the type-of-network determining unit 130 of the image forming apparatus 1 executes a connection test for a predetermined communication partner, and thereby determines the type of network. Alternatively, the type-of-network determining unit 130 may determine the type of network in accordance with a state of a switch provided in the image forming apparatus 1 (for example, the value or direction indicated by the switch, or an ON/OFF state). The switch may be provided as a member that is actually included in the image forming apparatus 1, or may be provided as software in a virtual manner.
The foregoing description of the exemplary embodiment of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiment was chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2014-193517 | Sep 2014 | JP | national |